fix client deleting item
This commit is contained in:
parent
0014b98c85
commit
b269edcbd9
@ -2129,6 +2129,7 @@ Sim range update
|
||||
|
||||
(06/08/2025)
|
||||
Fix scene re-adding tree that was previously removed
|
||||
Fix client toolbar update deleting entity that shouldn't be deleted
|
||||
|
||||
|
||||
|
||||
@ -2320,6 +2321,9 @@ Foliage Manager upgrades
|
||||
- Add wind simulation if relevant
|
||||
|
||||
|
||||
UI
|
||||
- UI changes look and feel based on season/biome of client's player
|
||||
|
||||
|
||||
Server Content Engine
|
||||
- On reloading a chunk with macro objects like structures, apply appropriate modifiers to align micro object with macro object
|
||||
|
||||
@ -91,6 +91,8 @@ public class ClientToolbarState implements BehaviorTree {
|
||||
* @param toEquip The entity to equip
|
||||
*/
|
||||
public void attemptEquip(Entity toEquip){
|
||||
//
|
||||
//getting data for the attempt
|
||||
RelationalInventoryState equipInventoryState = InventoryUtils.getEquipInventory(parent);
|
||||
boolean targetHasWhitelist = ItemUtils.hasEquipList(toEquip);
|
||||
String equipItemClass = ItemUtils.getEquipClass(toEquip);
|
||||
|
||||
@ -203,11 +203,13 @@ public class ClientInventoryState implements BehaviorTree {
|
||||
}
|
||||
if(InventoryUtils.hasToolbarInventory(existingContainerEnt)){
|
||||
RelationalInventoryState toolbarInventory = InventoryUtils.getToolbarInventory(existingContainerEnt);
|
||||
if(ClientToolbarState.hasClientToolbarState(existingContainerEnt)){
|
||||
ClientToolbarState toolbarState = ClientToolbarState.getClientToolbarState(existingContainerEnt);
|
||||
toolbarInventory.getEquipPointFromSlot(toolbarState.getSelectedSlot() + "");
|
||||
Entity removed = toolbarInventory.tryRemoveItem(itemEnt);
|
||||
if(removed != null){
|
||||
if(ClientToolbarState.hasClientToolbarState(containerEnt)){
|
||||
ClientToolbarState toolbarState = ClientToolbarState.getClientToolbarState(containerEnt);
|
||||
toolbarState.update();
|
||||
}
|
||||
}
|
||||
toolbarInventory.tryRemoveItem(itemEnt);
|
||||
}
|
||||
if(InventoryUtils.hasEquipInventory(existingContainerEnt)){
|
||||
RelationalInventoryState equipInventory = InventoryUtils.getEquipInventory(existingContainerEnt);
|
||||
@ -234,12 +236,14 @@ public class ClientInventoryState implements BehaviorTree {
|
||||
}
|
||||
if(InventoryUtils.hasToolbarInventory(containerEnt)){
|
||||
RelationalInventoryState toolbarInventory = InventoryUtils.getToolbarInventory(containerEnt);
|
||||
toolbarInventory.tryRemoveItem(itemEnt);
|
||||
}
|
||||
Entity removed = toolbarInventory.tryRemoveItem(itemEnt);
|
||||
if(removed != null){
|
||||
if(ClientToolbarState.hasClientToolbarState(containerEnt)){
|
||||
ClientToolbarState toolbarState = ClientToolbarState.getClientToolbarState(containerEnt);
|
||||
toolbarState.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
//store in new container
|
||||
switch(targetContainer){
|
||||
|
||||
@ -48,7 +48,7 @@ public class ClientSynchronizationManager {
|
||||
/**
|
||||
* Number of frames to keep an entity deletion key around
|
||||
*/
|
||||
static final int DELETED_KEY_STORAGE_FRAMES = 10;
|
||||
static final int DELETED_KEY_STORAGE_FRAMES = 1000;
|
||||
|
||||
/**
|
||||
* The list of messages to loop through
|
||||
@ -189,6 +189,9 @@ public class ClientSynchronizationManager {
|
||||
"Type of entity on server: " + serverTypeId + "\n" +
|
||||
"Client contains an entity that maps to that server id: " + clientContainsServerId + "\n" +
|
||||
"Entity on the client that was resolved from the server id: " + entityFromServerId + "\n" +
|
||||
"Message btree id: " + message.getbTreeId() + "\n" +
|
||||
"Message field id: " + message.getfieldId() + "\n" +
|
||||
"Deleted keys stores entity id: " + this.deletedEntityIds.get(message.getentityId()) + "\n" +
|
||||
""
|
||||
;
|
||||
LoggerInterface.loggerNetworking.WARNING(warningMessage);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user