Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player.addOrDropItem = function(id, amount, data) {
- let count_before = Player.getAmountOfItemInInv(id);
- Player.addItemInventory(id, amount, data);
- let count_after = Player.getAmountOfItemInInv(id);
- if(!(count_after > count_before)) {
- Level.dropItem(getPlayerX(), getPlayerY(), getPlayerZ(), 0, id, amount, data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement