Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean canHop(Inventory i, ItemStack item, int hop) {
- if (i.firstEmpty() != -1) {
- return true;
- }
- boolean can = false;
- for (ItemStack it : i.getContents()) {
- if (it == null) {
- can = true;
- break;
- } else {
- if (it.isSimilar(item)) {
- if ((it.getAmount() + hop) <= it.getMaxStackSize()) {
- can = true;
- break;
- }
- }
- }
- }
- return can;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement