Fix Craft Entity constructors and toStrings.
Also, standardise getHandle and clean up in general. getHandle is now using the 'entity' member variable instead of super.getHandle, as this reduces the number of chained calls needed.
This commit is contained in:
@@ -11,15 +11,6 @@ public class CraftSlime extends CraftLivingEntity implements Slime {
|
||||
super(server, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftSlime";
|
||||
}
|
||||
|
||||
public EntitySlime getHandle() {
|
||||
return (EntitySlime) super.getHandle();
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return getHandle().getSize();
|
||||
}
|
||||
@@ -27,4 +18,14 @@ public class CraftSlime extends CraftLivingEntity implements Slime {
|
||||
public void setSize(int size) {
|
||||
getHandle().setSize(size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntitySlime getHandle() {
|
||||
return (EntitySlime) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftSlime";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user