SPIGOT-2490: Villager farming event

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-07-08 11:12:40 +10:00
parent 6558543222
commit 9797cf7e43
11 changed files with 63 additions and 14 deletions

View File

@@ -686,8 +686,8 @@ public class CraftEventFactory {
return callEntityChangeBlockEvent(entity.getBukkitEntity(), block, material, 0, cancelled);
}
public static EntityChangeBlockEvent callEntityChangeBlockEvent(Entity entity, int x, int y, int z, net.minecraft.server.Block type, int data) {
Block block = entity.world.getWorld().getBlockAt(x, y, z);
public static EntityChangeBlockEvent callEntityChangeBlockEvent(Entity entity, BlockPosition position, net.minecraft.server.Block type, int data) {
Block block = entity.world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
Material material = CraftMagicNumbers.getMaterial(type);
return callEntityChangeBlockEvent(entity.getBukkitEntity(), block, material, data);