mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-13 17:04:26 +00:00
Validate ItemFieldKit to avoid metadata manipulations with items. (#375)
This commit is contained in:
1 parent
0ff171ba5e
commit
b535a7ca46
1 file changed
+4
@@ -213,6 +213,10 @@ public class WindowFieldKit extends Window {
|
||||
super.onWindowInventoryChanged();
|
||||
if (isServer()) {
|
||||
ItemStack kit = getPlayer().getHeldItem();
|
||||
if(kit == null || !kit.getItem().equals(BinnieCore.fieldKit)) {
|
||||
return;
|
||||
}
|
||||
|
||||
int sheets = 64 - kit.getItemDamage();
|
||||
int size = (getWindowInventory().getStackInSlot(1) == null) ? 0 : getWindowInventory().getStackInSlot(1).stackSize;
|
||||
if (sheets != size) {
|
||||
|
||||
Reference in new issue
Block a user