Bugfix
This commit is contained in:
parent
51ce3a9774
commit
9956589189
@ -11,7 +11,7 @@ loader_version=0.16.0
|
||||
fabric_version=0.102.1+1.21.1
|
||||
|
||||
# Mod Properties
|
||||
mod_version=3.2.1
|
||||
mod_version=3.2.4
|
||||
maven_group=systems.brn
|
||||
archives_base_name=Serverstorage
|
||||
|
||||
|
@ -243,18 +243,22 @@ public class StorageScreen extends PagedGui {
|
||||
}
|
||||
}
|
||||
} else if (!cursorStack.isEmpty()) {
|
||||
insertItem(cursorStack);
|
||||
insertItem(cursorStack, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void insertItem(ItemStack stack) {
|
||||
public void insertItem(ItemStack stack, boolean isCursor) {
|
||||
if (!checkDistance()) {
|
||||
return;
|
||||
}
|
||||
int canPutIn = stack.getCount() - getNetwork().putItemStackRemainder(stack);
|
||||
if (canPutIn > 0) {
|
||||
if (isCursor) {
|
||||
stack.decrement(canPutIn);
|
||||
} else {
|
||||
removeFromInventory(player.getInventory(), stack, canPutIn);
|
||||
}
|
||||
refreshTerminals();
|
||||
}
|
||||
}
|
||||
@ -265,7 +269,7 @@ public class StorageScreen extends PagedGui {
|
||||
return false;
|
||||
}
|
||||
refreshTerminals();
|
||||
insertItem(stack);
|
||||
insertItem(stack, true);
|
||||
return super.insertItem(stack, startIndex, endIndex, fromLast);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user