geforkt von Mirrors/Paper
SPIGOT-7600: EntityChangeBlockEvent is not fired for frog eggs
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
4624f313ca
Commit
d76a8e373b
@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
|
||||
@@ -38,6 +38,12 @@
|
||||
if (worldserver.getBlockState(blockposition2).isAir()) {
|
||||
IBlockData iblockdata = block.defaultBlockState();
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityliving, blockposition2, iblockdata)) {
|
||||
+ memoryaccessor2.erase();
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
worldserver.setBlock(blockposition2, iblockdata, 3);
|
||||
worldserver.gameEvent(GameEvent.BLOCK_PLACE, blockposition2, GameEvent.a.of(entityliving, iblockdata));
|
||||
worldserver.playSound((EntityHuman) null, (Entity) entityliving, SoundEffects.FROG_LAY_SPAWN, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren