Rework skull dropping. Fixes BUKKIT-2930 and BUKKIT-2820
Skulls need their tile entity in order to create an item correctly when broken unlike every other block. Instead of sprinkling special cases all over the code just override dropNaturally for skulls to read from their tile entity and make sure everything that wants to drop them calls this method before removing the block. There is only one case where this wasn't already true so we end up with much less special casing. By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
@@ -348,10 +348,6 @@ public class CraftBlock implements Block {
|
||||
boolean result = false;
|
||||
|
||||
if (block != null) {
|
||||
if (block.id == net.minecraft.server.Block.SKULL.id) {
|
||||
data = (byte) block.getDropData(chunk.getHandle().world, x, y, z);
|
||||
}
|
||||
|
||||
block.dropNaturally(chunk.getHandle().world, x, y, z, data, 1.0F, 0);
|
||||
result = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user