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