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