mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Fixed pedestal not dropping item when is broken or explodes
This commit is contained in:
parent
aa7758467b
commit
349d4f7e90
@ -3115,6 +3115,10 @@ public class SlimefunSetup {
|
|||||||
public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {
|
public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {
|
||||||
Item stack = AncientAltarListener.findItem(b);
|
Item stack = AncientAltarListener.findItem(b);
|
||||||
if (stack != null) stack.removeMetadata("item_placed", SlimefunStartup.instance);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user