mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/item/EntityItemFrame.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityItemFrame.java
|
|
@@ -63,6 +63,9 @@
|
|
{
|
|
if (!this.world.isRemote)
|
|
{
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount, false) || this.isDead) {
|
|
+ return true;
|
|
+ }
|
|
this.dropItemOrSelf(source.getTrueSource(), false);
|
|
this.playSound(SoundEvents.ENTITY_ITEMFRAME_REMOVE_ITEM, 1.0F, 1.0F);
|
|
this.setDisplayedItem(ItemStack.EMPTY);
|
|
@@ -140,13 +143,14 @@
|
|
{
|
|
if (!stack.isEmpty())
|
|
{
|
|
- if (stack.getItem() == Items.FILLED_MAP)
|
|
+ if (stack.getItem() instanceof ItemMap)
|
|
{
|
|
MapData mapdata = ((ItemMap)stack.getItem()).getMapData(stack, this.world);
|
|
mapdata.mapDecorations.remove("frame-" + this.getEntityId());
|
|
}
|
|
|
|
stack.setItemFrame((EntityItemFrame)null);
|
|
+ this.setDisplayedItem(ItemStack.EMPTY); //Forge: Fix MC-124833 Pistons duplicating Items.
|
|
}
|
|
}
|
|
|