mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-25 01:13:53 -07:00
@@ -11,13 +11,12 @@
|
||||
public class EntityCow extends EntityAnimal {
|
||||
|
||||
public EntityCow(EntityTypes<? extends EntityCow> entitytypes, World world) {
|
||||
@@ -55,13 +60,23 @@
|
||||
@@ -55,13 +60,22 @@
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
if (itemstack.getItem() == Items.BUCKET && !entityhuman.abilities.canInstantlyBuild && !this.isBaby()) {
|
||||
+ // CraftBukkit start - Got milk?
|
||||
+ org.bukkit.Location loc = this.getBukkitEntity().getLocation();
|
||||
+ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), null, itemstack, Items.MILK_BUCKET);
|
||||
+ org.bukkit.event.player.PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman.world, entityhuman, this.getChunkCoordinates(), this.getChunkCoordinates(), null, itemstack, Items.MILK_BUCKET);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
|
Reference in New Issue
Block a user