mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 18:39:42 -05:00
SPIGOT-2490: Villager farming event
This commit is contained in:
1 parent
a327d9f1da
commit
d7c257e120
11 files changed
+63
-14
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user