Implement methods for spawning FallingBlocks and add various FallingBlock methods. Adds BUKKIT-2282

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot
2012-08-13 22:21:10 -05:00
parent cc018c2203
commit 73cf129db7
2 changed files with 49 additions and 4 deletions

View File

@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntityFallingBlock;
import org.bukkit.Material;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftEntity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.FallingSand;
@@ -26,4 +26,24 @@ public class CraftFallingSand extends CraftEntity implements FallingSand {
public EntityType getType() {
return EntityType.FALLING_BLOCK;
}
public Material getMaterial() {
return Material.getMaterial(getBlockId());
}
public int getBlockId() {
return getHandle().id;
}
public byte getBlockData() {
return (byte) getHandle().data;
}
public boolean getDropItem() {
return getHandle().dropItem;
}
public void setDropItem(boolean drop) {
getHandle().dropItem = drop;
}
}