2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/item/ItemMinecart.java
|
|
|
|
+++ b/net/minecraft/world/item/ItemMinecart.java
|
2024-10-22 17:15:00 +02:00
|
|
|
@@ -67,7 +67,12 @@
|
|
|
|
if (world instanceof WorldServer) {
|
|
|
|
WorldServer worldserver = (WorldServer) world;
|
|
|
|
|
|
|
|
- worldserver.addFreshEntity(entityminecartabstract);
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityminecartabstract).isCancelled()) {
|
|
|
|
+ return EnumInteractionResult.FAIL;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+ if (!worldserver.addFreshEntity(entityminecartabstract)) return EnumInteractionResult.PASS; // CraftBukkit
|
|
|
|
worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.a.of(itemactioncontext.getPlayer(), worldserver.getBlockState(blockposition.below())));
|
2015-02-26 23:41:06 +01:00
|
|
|
}
|
2017-03-21 23:03:20 +01:00
|
|
|
|