summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/EntityZombie.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java16
3 files changed, 27 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 84c1d115..a0934a25 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -61,7 +61,7 @@ public class EntityZombie extends EntityMonster {
}
public void setBaby(boolean flag) {
- this.getDataWatcher().watch(12, Byte.valueOf((byte) 1));
+ this.getDataWatcher().watch(12, Byte.valueOf((byte) (flag ? 1 : 0))); // CraftBukkit - added flag
}
public boolean isVillager() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
index 30933414..58da8994 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntitySkeleton;
+import org.apache.commons.lang.Validate;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Skeleton;
@@ -25,4 +26,13 @@ public class CraftSkeleton extends CraftMonster implements Skeleton {
public EntityType getType() {
return EntityType.SKELETON;
}
+
+ public SkeletonType getSkeletonType() {
+ return SkeletonType.getType(getHandle().getSkeletonType());
+ }
+
+ public void setSkeletonType(SkeletonType type) {
+ Validate.notNull(type);
+ getHandle().setSkeletonType(type.getId());
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
index 12139e31..619579d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
@@ -25,4 +25,20 @@ public class CraftZombie extends CraftMonster implements Zombie {
public EntityType getType() {
return EntityType.ZOMBIE;
}
+
+ public boolean isBaby() {
+ return getHandle().isBaby();
+ }
+
+ public void setBaby(boolean flag) {
+ getHandle().setBaby(flag);
+ }
+
+ public boolean isVillager() {
+ return getHandle().isVillager();
+ }
+
+ public void setVillager(boolean flag) {
+ getHandle().setVillager(flag);
+ }
}