1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed pedestal not dropping item when is broken or explodes

This commit is contained in:
Redemption 2017-12-28 11:11:03 +01:00 committed by GitHub
parent aa7758467b
commit 349d4f7e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3115,6 +3115,10 @@ public class SlimefunSetup {
public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {
Item stack = AncientAltarListener.findItem(b);
if (stack != null) stack.removeMetadata("item_placed", SlimefunStartup.instance);
if(reason == UnregisterReason.PLAYER_BREAK || reason == UnregisterReason.EXPLODE) {
b.getWorld().dropItem(b.getLocation(), AncientAltarListener.fixItemStack(stack.getItemStack(), stack.getCustomName()));
stack.remove();
}
return true;
}
});