ui fix client side, verify server side sync

This commit is contained in:
austin 2022-06-07 13:21:45 -04:00
parent 9bb6e5b2ad
commit f41f994fc1

View File

@ -85,9 +85,13 @@ public class InventoryState implements BehaviorTree {
if(inInventorySpawnedItem != null){ if(inInventorySpawnedItem != null){
Globals.entityManager.mapIdToId(inInventorySpawnedItem.getId(), message.getentityId()); Globals.entityManager.mapIdToId(inInventorySpawnedItem.getId(), message.getentityId());
} }
//attempt re-render ui
WindowUtils.attemptRedrawInventoryWindows();
break; break;
case REMOVEITEMFROMINVENTORY: case REMOVEITEMFROMINVENTORY:
InventoryUtils.removeItemFromInventories(parent, Globals.entityManager.getEntityFromServerId(message.getentityId())); InventoryUtils.removeItemFromInventories(parent, Globals.entityManager.getEntityFromServerId(message.getentityId()));
//attempt re-render ui
WindowUtils.attemptRedrawInventoryWindows();
break; break;
case SERVERCOMMANDMOVEITEMCONTAINER: { case SERVERCOMMANDMOVEITEMCONTAINER: {
//this is a command to switch an item from one inventory to another (ie equip->natural or vice-versa) //this is a command to switch an item from one inventory to another (ie equip->natural or vice-versa)