@@ -1564,14 +1564,19 @@ private void handleInventoryUpdate(InventoryUpdateMessage message) {
15641564 if (!isValidInventoryCount (message .getAppleCount ()) ||
15651565 !isValidInventoryCount (message .getBananaCount ()) ||
15661566 !isValidInventoryCount (message .getAppleSaplingCount ()) ||
1567+ !isValidInventoryCount (message .getBananaSaplingCount ()) ||
15671568 !isValidInventoryCount (message .getBambooSaplingCount ()) ||
15681569 !isValidInventoryCount (message .getBambooStackCount ()) ||
15691570 !isValidInventoryCount (message .getTreeSaplingCount ()) ||
15701571 !isValidInventoryCount (message .getWoodStackCount ()) ||
15711572 !isValidInventoryCount (message .getPebbleCount ()) ||
15721573 !isValidInventoryCount (message .getPalmFiberCount ()) ||
15731574 !isValidInventoryCount (message .getFishCount ()) ||
1574- !isValidInventoryCount (message .getFrontFenceCount ())) {
1575+ !isValidInventoryCount (message .getFrontFenceCount ()) ||
1576+ !isValidInventoryCount (message .getBackFenceCount ()) ||
1577+ !isValidInventoryCount (message .getBowAndArrowCount ()) ||
1578+ !isValidInventoryCount (message .getWoodFenceMaterialCount ()) ||
1579+ !isValidInventoryCount (message .getBambooFenceMaterialCount ())) {
15751580 System .err .println ("Invalid inventory counts from " + clientId );
15761581 logSecurityViolation ("Invalid inventory counts" );
15771582 return ;
@@ -1590,6 +1595,10 @@ private void handleInventoryUpdate(InventoryUpdateMessage message) {
15901595 playerState .setPalmFiberCount (message .getPalmFiberCount ());
15911596 playerState .setFishCount (message .getFishCount ());
15921597 playerState .setFrontFenceCount (message .getFrontFenceCount ());
1598+ playerState .setBackFenceCount (message .getBackFenceCount ());
1599+ playerState .setBowAndArrowCount (message .getBowAndArrowCount ());
1600+ playerState .setWoodFenceMaterialCount (message .getWoodFenceMaterialCount ());
1601+ playerState .setBambooFenceMaterialCount (message .getBambooFenceMaterialCount ());
15931602
15941603 // Update in world state
15951604 server .getWorldState ().addOrUpdatePlayer (playerState );
@@ -1606,7 +1615,11 @@ private void handleInventoryUpdate(InventoryUpdateMessage message) {
16061615 ", Pebbles=" + message .getPebbleCount () +
16071616 ", PalmFiber=" + message .getPalmFiberCount () +
16081617 ", Fish=" + message .getFishCount () +
1609- ", FrontFence=" + message .getFrontFenceCount ());
1618+ ", FrontFence=" + message .getFrontFenceCount () +
1619+ ", BackFence=" + message .getBackFenceCount () +
1620+ ", BowAndArrow=" + message .getBowAndArrowCount () +
1621+ ", WoodFenceMat=" + message .getWoodFenceMaterialCount () +
1622+ ", BambooFenceMat=" + message .getBambooFenceMaterialCount ());
16101623 }
16111624
16121625 /**
0 commit comments