From 57f89d4651c5e4c39f9c9183752294a5376e2445 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 26 Apr 2011 07:29:25 -0700 Subject: [PATCH] Added hasSaddle/getSaddle By: xPaw --- .../bukkit/craftbukkit/entity/CraftPig.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java index b92aa36cc..8f011011f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java @@ -1,20 +1,28 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityPig; - import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.entity.CraftAnimals; import org.bukkit.entity.Pig; public class CraftPig extends CraftAnimals implements Pig { - public CraftPig(CraftServer server, EntityPig entity) { super(server, entity); } + public boolean hasSaddle() { + return getHandle().x(); + } + + public void setSaddle(boolean flag) { + getHandle().a(flag); + } + + public EntityPig getHandle() { + return (EntityPig) super.getHandle(); + } + @Override public String toString() { return "CraftPig"; } - -} +} \ No newline at end of file