Archiviert
13
0

SPIGOT-1181: Ensure Minecart command updates visually

Dieser Commit ist enthalten in:
md_5 2016-06-30 13:33:26 +10:00
Ursprung 5f61739cb8
Commit 939423a8f1
2 geänderte Dateien mit 16 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,11 @@
--- a/net/minecraft/server/EntityMinecartCommandBlock.java
+++ b/net/minecraft/server/EntityMinecartCommandBlock.java
@@ -7,6 +7,9 @@
private static final DataWatcherObject<String> a = DataWatcher.a(EntityMinecartCommandBlock.class, DataWatcherRegistry.d);
@@ -4,9 +4,12 @@
public class EntityMinecartCommandBlock extends EntityMinecartAbstract {
- private static final DataWatcherObject<String> a = DataWatcher.a(EntityMinecartCommandBlock.class, DataWatcherRegistry.d);
+ public static final DataWatcherObject<String> a = DataWatcher.a(EntityMinecartCommandBlock.class, DataWatcherRegistry.d); // PAIL: private -> public
private static final DataWatcherObject<IChatBaseComponent> b = DataWatcher.a(EntityMinecartCommandBlock.class, DataWatcherRegistry.e);
private final CommandBlockListenerAbstract c = new CommandBlockListenerAbstract() {
+ {

Datei anzeigen

@ -22,19 +22,25 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
super(server, entity);
}
@Override
public EntityMinecartCommandBlock getHandle() {
return (EntityMinecartCommandBlock) entity;
}
@Override
public String getCommand() {
return ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().getCommand();
return getHandle().getCommandBlock().getCommand();
}
@Override
public void setCommand(String command) {
((EntityMinecartCommandBlock) getHandle()).getCommandBlock().setCommand(command != null ? command : "");
getHandle().getCommandBlock().setCommand(command != null ? command : "");
getHandle().getDataWatcher().set(EntityMinecartCommandBlock.a, getHandle().getCommandBlock().getCommand()); // PAIL: rename
}
@Override
public void setName(String name) {
((EntityMinecartCommandBlock) getHandle()).getCommandBlock().setName(name != null ? name : "@");
getHandle().getCommandBlock().setName(name != null ? name : "@");
}
@Override
@ -52,7 +58,7 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
@Override
public String getName() {
return ((EntityMinecartCommandBlock) getHandle()).getCommandBlock().getName();
return getHandle().getCommandBlock().getName();
}
@Override