geforkt von Mirrors/Paper
Call EntityChangeBlockEvent for frogs egg (#9213)
Dieser Commit ist enthalten in:
Ursprung
5957c490da
Commit
b4656d3a02
@ -78,6 +78,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
world.setBlockAndUpdate(blockposition1Final, iblockdata1); // CraftBukkit - decompile error
|
||||
});
|
||||
world.levelEvent(3002, blockposition1, -1);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
@@ -0,0 +0,0 @@ public class TryLaySpawnOnWaterNearLand {
|
||||
BlockPos blockPos3 = blockPos2.above();
|
||||
if (world.getBlockState(blockPos3).isAir()) {
|
||||
BlockState blockState = frogSpawn.defaultBlockState();
|
||||
+ // Paper start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, blockState).isCancelled()) {
|
||||
+ isPregnant.erase(); // forgot pregnant memory
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
world.setBlock(blockPos3, blockState, 3);
|
||||
world.gameEvent(GameEvent.BLOCK_PLACE, blockPos3, GameEvent.Context.of(entity, blockState));
|
||||
world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/AxeItem.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren