From cdd44bd362e18a3ec08056a555f03e9eada689e7 Mon Sep 17 00:00:00 2001 From: austin Date: Thu, 12 Sep 2024 19:13:34 -0400 Subject: [PATCH] bugfixes --- assets/Data/entity/objects.json | 10 +++++----- assets/Data/{ => entity}/objects/debug_objects.json | 2 +- assets/Data/{ => entity}/objects/floatingisland.json | 2 +- assets/Data/{ => entity}/objects/game_objects.json | 2 +- .../Data/{ => entity}/objects/testscene1objects.json | 8 ++++---- docs/src/progress/renderertodo.md | 2 ++ .../electrosphere/client/scene/ClientSceneWrapper.java | 2 +- .../electrosphere/client/sim/ClientSimulation.java | 2 +- .../electrosphere/collision/hitbox/HitboxUtils.java | 2 +- src/main/java/electrosphere/engine/Globals.java | 2 +- .../java/electrosphere/entity/ServerEntityUtils.java | 2 +- .../java/electrosphere/entity/{ => scene}/Scene.java | 6 ++++-- .../entity/{types => state}/attach/AttachUtils.java | 2 +- .../entity/state/attack/ClientAttackTree.java | 2 +- .../entity/state/attack/ServerAttackTree.java | 2 +- .../entity/state/block/ServerBlockTree.java | 2 +- .../entity/state/equip/ClientEquipState.java | 2 +- .../entity/state/equip/ServerEquipState.java | 2 +- .../entity/state/hitbox/HitboxCollectionState.java | 2 +- .../electrosphere/entity/types/item/ItemUtils.java | 2 +- .../entity/types/tree/ProceduralTree.java | 2 +- .../electrosphere/menu/debug/ImGuiEntityMacros.java | 2 +- .../net/client/protocol/EntityProtocol.java | 6 +++--- .../renderer/pipelines/FirstPersonItemsPipeline.java | 2 +- .../renderer/pipelines/MainContentPipeline.java | 2 +- .../collision/ServerHitboxResolutionCallback.java | 2 +- src/main/java/electrosphere/server/datacell/Realm.java | 2 +- .../electrosphere/server/datacell/ServerDataCell.java | 2 +- .../server/datacell/ViewportDataCellManager.java | 2 +- src/main/java/electrosphere/server/saves/Save.java | 2 +- .../server/simulation/MicroSimulation.java | 3 +-- .../entity/state/equip/ClientEquipStateTests.java | 2 +- .../entity/state/equip/ServerEquipStateTests.java | 2 +- .../entity/types/attach/AttachUtilsUnitTests.java | 1 + 34 files changed, 47 insertions(+), 43 deletions(-) rename assets/Data/{ => entity}/objects/debug_objects.json (87%) rename assets/Data/{ => entity}/objects/floatingisland.json (93%) rename assets/Data/{ => entity}/objects/game_objects.json (82%) rename assets/Data/{ => entity}/objects/testscene1objects.json (90%) rename src/main/java/electrosphere/entity/{ => scene}/Scene.java (97%) rename src/main/java/electrosphere/entity/{types => state}/attach/AttachUtils.java (99%) diff --git a/assets/Data/entity/objects.json b/assets/Data/entity/objects.json index 3a1e21fc..be968f5d 100644 --- a/assets/Data/entity/objects.json +++ b/assets/Data/entity/objects.json @@ -2,7 +2,7 @@ "objects" : [ { - "objectId" : "crateWooden", + "id" : "crateWooden", "modelPath" : "Models/crate2.fbx", "tokens" : [ "GRAVITY", @@ -25,9 +25,9 @@ ], "files" : [ - "Data/objects/floatingisland.json", - "Data/objects/testscene1objects.json", - "Data/objects/debug_objects.json", - "Data/objects/game_objects.json" + "Data/entity/objects/floatingisland.json", + "Data/entity/objects/testscene1objects.json", + "Data/entity/objects/debug_objects.json", + "Data/entity/objects/game_objects.json" ] } \ No newline at end of file diff --git a/assets/Data/objects/debug_objects.json b/assets/Data/entity/objects/debug_objects.json similarity index 87% rename from assets/Data/objects/debug_objects.json rename to assets/Data/entity/objects/debug_objects.json index be609fd4..2f644ebe 100644 --- a/assets/Data/objects/debug_objects.json +++ b/assets/Data/entity/objects/debug_objects.json @@ -2,7 +2,7 @@ "objects" : [ { - "objectId" : "hitboxTester", + "id" : "hitboxTester", "hitboxData" : [ { "type": "static_capsule", diff --git a/assets/Data/objects/floatingisland.json b/assets/Data/entity/objects/floatingisland.json similarity index 93% rename from assets/Data/objects/floatingisland.json rename to assets/Data/entity/objects/floatingisland.json index 85e7c667..4a6b0def 100644 --- a/assets/Data/objects/floatingisland.json +++ b/assets/Data/entity/objects/floatingisland.json @@ -2,7 +2,7 @@ "objects" : [ { - "objectId" : "floatingisland1", + "id" : "floatingisland1", "modelPath" : "Models/floatingisland1.fbx", "tokens" : [ "DISABLE_COLLISION_REACTION", diff --git a/assets/Data/objects/game_objects.json b/assets/Data/entity/objects/game_objects.json similarity index 82% rename from assets/Data/objects/game_objects.json rename to assets/Data/entity/objects/game_objects.json index e6c12343..30dcfdde 100644 --- a/assets/Data/objects/game_objects.json +++ b/assets/Data/entity/objects/game_objects.json @@ -2,7 +2,7 @@ "objects" : [ { - "objectId" : "spawnPoint", + "id" : "spawnPoint", "modelPath" : "Models/gameobj/token.glb", "tokens": [ "SPAWNPOINT" diff --git a/assets/Data/objects/testscene1objects.json b/assets/Data/entity/objects/testscene1objects.json similarity index 90% rename from assets/Data/objects/testscene1objects.json rename to assets/Data/entity/objects/testscene1objects.json index 58246558..d7f1b15e 100644 --- a/assets/Data/objects/testscene1objects.json +++ b/assets/Data/entity/objects/testscene1objects.json @@ -2,7 +2,7 @@ "objects" : [ { - "objectId" : "terrain1", + "id" : "terrain1", "modelPath" : "Models/testvalley.fbx", "tokens" : [ "DISABLE_COLLISION_REACTION", @@ -12,7 +12,7 @@ "graphicsTemplate": null }, { - "objectId" : "skyscraper1", + "id" : "skyscraper1", "modelPath" : "Models/skyscraper1.fbx", "tokens" : [ "DISABLE_COLLISION_REACTION", @@ -22,7 +22,7 @@ "graphicsTemplate": null }, { - "objectId" : "smoke1", + "id" : "smoke1", "modelPath" : "Models/unitcube.fbx", "tokens" : [ "DRAW_TRANSPARENT_PASS" @@ -42,7 +42,7 @@ } }, { - "objectId" : "geometrytest1", + "id" : "geometrytest1", "modelPath" : "Models/geometry1.fbx", "tokens" : [ "DISABLE_COLLISION_REACTION", diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 9fce9fcb..b73e7c06 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -740,6 +740,8 @@ Rearch instanced actor ParticleService implementation Fix SSBO implementation misusing BufferUtils Massive entity spawning refactor to collapse entity type permutations +Move AttachUtils package +Move Scene package # TODO diff --git a/src/main/java/electrosphere/client/scene/ClientSceneWrapper.java b/src/main/java/electrosphere/client/scene/ClientSceneWrapper.java index b42b922a..1e846e3e 100644 --- a/src/main/java/electrosphere/client/scene/ClientSceneWrapper.java +++ b/src/main/java/electrosphere/client/scene/ClientSceneWrapper.java @@ -14,7 +14,7 @@ import electrosphere.collision.hitbox.HitboxManager; import electrosphere.collision.hitbox.HitboxUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; import electrosphere.logger.LoggerInterface; /** diff --git a/src/main/java/electrosphere/client/sim/ClientSimulation.java b/src/main/java/electrosphere/client/sim/ClientSimulation.java index 99f71f53..170fc5cd 100644 --- a/src/main/java/electrosphere/client/sim/ClientSimulation.java +++ b/src/main/java/electrosphere/client/sim/ClientSimulation.java @@ -11,9 +11,9 @@ import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.collidable.ClientCollidableTree; import electrosphere.entity.state.equip.ClientEquipState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.renderer.actor.Actor; diff --git a/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java b/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java index a7363974..e442a9fb 100644 --- a/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java +++ b/src/main/java/electrosphere/collision/hitbox/HitboxUtils.java @@ -3,7 +3,7 @@ package electrosphere.collision.hitbox; import electrosphere.collision.collidable.Collidable; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; -import electrosphere.entity.types.attach.AttachUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.hitbox.HitboxCollectionState.HitboxState; import electrosphere.entity.state.hitbox.HitboxCollectionState.HitboxType; diff --git a/src/main/java/electrosphere/engine/Globals.java b/src/main/java/electrosphere/engine/Globals.java index fe9b0dd1..7f36fcee 100644 --- a/src/main/java/electrosphere/engine/Globals.java +++ b/src/main/java/electrosphere/engine/Globals.java @@ -40,7 +40,7 @@ import electrosphere.engine.signal.Signal.SignalType; import electrosphere.engine.threads.ThreadManager; import electrosphere.engine.time.Timekeeper; import electrosphere.entity.Entity; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; import electrosphere.game.config.UserSettings; import electrosphere.game.data.particle.ParticleDefinition; import electrosphere.game.data.voxel.VoxelType; diff --git a/src/main/java/electrosphere/entity/ServerEntityUtils.java b/src/main/java/electrosphere/entity/ServerEntityUtils.java index cac0c975..77cf6409 100644 --- a/src/main/java/electrosphere/entity/ServerEntityUtils.java +++ b/src/main/java/electrosphere/entity/ServerEntityUtils.java @@ -5,8 +5,8 @@ import java.util.List; import org.joml.Vector3d; import electrosphere.engine.Globals; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.hitbox.HitboxCollectionState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.net.parser.net.message.EntityMessage; import electrosphere.server.datacell.Realm; diff --git a/src/main/java/electrosphere/entity/Scene.java b/src/main/java/electrosphere/entity/scene/Scene.java similarity index 97% rename from src/main/java/electrosphere/entity/Scene.java rename to src/main/java/electrosphere/entity/scene/Scene.java index f9583ed3..21af95e5 100644 --- a/src/main/java/electrosphere/entity/Scene.java +++ b/src/main/java/electrosphere/entity/scene/Scene.java @@ -1,8 +1,10 @@ -package electrosphere.entity; +package electrosphere.entity.scene; import electrosphere.engine.Globals; +import electrosphere.entity.Entity; +import electrosphere.entity.EntityTags; import electrosphere.entity.btree.BehaviorTree; -import electrosphere.entity.types.attach.AttachUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.logger.LoggerInterface; import java.util.List; diff --git a/src/main/java/electrosphere/entity/types/attach/AttachUtils.java b/src/main/java/electrosphere/entity/state/attach/AttachUtils.java similarity index 99% rename from src/main/java/electrosphere/entity/types/attach/AttachUtils.java rename to src/main/java/electrosphere/entity/state/attach/AttachUtils.java index ce2766d8..29366cda 100644 --- a/src/main/java/electrosphere/entity/types/attach/AttachUtils.java +++ b/src/main/java/electrosphere/entity/state/attach/AttachUtils.java @@ -1,4 +1,4 @@ -package electrosphere.entity.types.attach; +package electrosphere.entity.state.attach; import electrosphere.engine.Globals; import electrosphere.entity.Entity; diff --git a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java index 0e6ed77f..78ebf912 100644 --- a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java @@ -7,13 +7,13 @@ import electrosphere.entity.EntityDataStrings; import electrosphere.entity.btree.BehaviorTree; import electrosphere.entity.btree.StateTransitionUtil; import electrosphere.entity.btree.StateTransitionUtil.StateTransitionUtilItem; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.collidable.Impulse; import electrosphere.entity.state.equip.ClientEquipState; import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.movement.fall.ClientFallTree; import electrosphere.entity.state.movement.jump.ClientJumpTree; import electrosphere.entity.state.rotator.RotatorTree; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; diff --git a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java index d5a2e4d0..564bd230 100644 --- a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java @@ -12,6 +12,7 @@ import electrosphere.entity.EntityUtils; import electrosphere.entity.btree.BehaviorTree; import electrosphere.entity.btree.StateTransitionUtil; import electrosphere.entity.btree.StateTransitionUtil.StateTransitionUtilItem; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeDriftState; import electrosphere.entity.state.attack.ClientAttackTree.AttackTreeState; import electrosphere.entity.state.collidable.Impulse; @@ -20,7 +21,6 @@ import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.movement.fall.ServerFallTree; import electrosphere.entity.state.movement.jump.ServerJumpTree; import electrosphere.entity.state.rotator.ServerRotatorTree; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.collision.CollisionObjUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; diff --git a/src/main/java/electrosphere/entity/state/block/ServerBlockTree.java b/src/main/java/electrosphere/entity/state/block/ServerBlockTree.java index 86045635..4b721b56 100644 --- a/src/main/java/electrosphere/entity/state/block/ServerBlockTree.java +++ b/src/main/java/electrosphere/entity/state/block/ServerBlockTree.java @@ -13,9 +13,9 @@ import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.net.parser.net.message.SynchronizationMessage; import electrosphere.server.datacell.utils.DataCellSearchUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.block.ClientBlockTree.BlockState; import electrosphere.entity.state.hitbox.HitboxCollectionState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.game.data.creature.type.block.BlockSystem; import electrosphere.game.data.creature.type.block.BlockVariant; import electrosphere.net.synchronization.annotation.SyncedField; diff --git a/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java b/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java index e04aa596..26ce2129 100644 --- a/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java +++ b/src/main/java/electrosphere/entity/state/equip/ClientEquipState.java @@ -14,9 +14,9 @@ import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; import electrosphere.entity.btree.BehaviorTree; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.client.firstPerson.FirstPersonTree; import electrosphere.entity.state.gravity.GravityUtils; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.game.data.common.treedata.TreeDataAnimation; diff --git a/src/main/java/electrosphere/entity/state/equip/ServerEquipState.java b/src/main/java/electrosphere/entity/state/equip/ServerEquipState.java index eb4aa51a..7dcec7ac 100644 --- a/src/main/java/electrosphere/entity/state/equip/ServerEquipState.java +++ b/src/main/java/electrosphere/entity/state/equip/ServerEquipState.java @@ -18,12 +18,12 @@ import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; import electrosphere.entity.ServerEntityUtils; import electrosphere.entity.btree.BehaviorTree; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.block.ServerBlockTree; import electrosphere.entity.state.gravity.GravityUtils; import electrosphere.entity.state.inventory.InventoryUtils; import electrosphere.entity.state.inventory.RelationalInventoryState; import electrosphere.entity.state.inventory.UnrelationalInventoryState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.game.data.common.treedata.TreeDataAnimation; diff --git a/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java b/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java index a4034a45..4ff8a778 100644 --- a/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java +++ b/src/main/java/electrosphere/entity/state/hitbox/HitboxCollectionState.java @@ -21,8 +21,8 @@ import electrosphere.collision.hitbox.HitboxUtils.HitboxPositionCallback; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.hitbox.HitboxCollectionState.HitboxState.HitboxShapeType; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.game.data.collidable.HitboxData; import electrosphere.game.data.utils.DataFormatUtil; import electrosphere.logger.LoggerInterface; diff --git a/src/main/java/electrosphere/entity/types/item/ItemUtils.java b/src/main/java/electrosphere/entity/types/item/ItemUtils.java index d2405347..cf9667b5 100644 --- a/src/main/java/electrosphere/entity/types/item/ItemUtils.java +++ b/src/main/java/electrosphere/entity/types/item/ItemUtils.java @@ -16,10 +16,10 @@ import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; import electrosphere.entity.ServerEntityUtils; import electrosphere.entity.state.AnimationPriorities; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.gravity.ServerGravityTree; import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.types.EntityTypes.EntityType; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.common.CommonEntityUtils; import electrosphere.game.data.item.type.EquipData; import electrosphere.game.data.item.type.EquipWhitelist; diff --git a/src/main/java/electrosphere/entity/types/tree/ProceduralTree.java b/src/main/java/electrosphere/entity/types/tree/ProceduralTree.java index c7d558f7..8ad0186c 100644 --- a/src/main/java/electrosphere/entity/types/tree/ProceduralTree.java +++ b/src/main/java/electrosphere/entity/types/tree/ProceduralTree.java @@ -27,7 +27,7 @@ import electrosphere.entity.EntityCreationUtils; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityUtils; import electrosphere.entity.btree.BehaviorTree; -import electrosphere.entity.types.attach.AttachUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.game.data.foliage.type.FoliageType; import electrosphere.game.data.foliage.type.TreeModel; import electrosphere.renderer.actor.instance.InstancedActor; diff --git a/src/main/java/electrosphere/menu/debug/ImGuiEntityMacros.java b/src/main/java/electrosphere/menu/debug/ImGuiEntityMacros.java index 0cdf1cc7..9ba57c3c 100644 --- a/src/main/java/electrosphere/menu/debug/ImGuiEntityMacros.java +++ b/src/main/java/electrosphere/menu/debug/ImGuiEntityMacros.java @@ -13,10 +13,10 @@ import electrosphere.collision.PhysicsEntityUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.client.firstPerson.FirstPersonTree; import electrosphere.entity.state.equip.ClientEquipState; import electrosphere.entity.state.server.ServerPlayerViewDirTree; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.foliage.FoliageUtils; import electrosphere.entity.types.item.ItemUtils; diff --git a/src/main/java/electrosphere/net/client/protocol/EntityProtocol.java b/src/main/java/electrosphere/net/client/protocol/EntityProtocol.java index 212cdbd4..f2942c24 100644 --- a/src/main/java/electrosphere/net/client/protocol/EntityProtocol.java +++ b/src/main/java/electrosphere/net/client/protocol/EntityProtocol.java @@ -10,12 +10,12 @@ import electrosphere.engine.Globals; import electrosphere.entity.ClientEntityUtils; import electrosphere.entity.Entity; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.equip.ClientEquipState; import electrosphere.entity.state.inventory.InventoryUtils; import electrosphere.entity.state.physicssync.ClientPhysicsSyncTree; import electrosphere.entity.types.EntityTypes; import electrosphere.entity.types.EntityTypes.EntityType; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.common.CommonEntityUtils; import electrosphere.entity.types.creature.CreatureEquipData.EquippedItem; import electrosphere.entity.types.creature.CreatureTemplate; @@ -242,7 +242,7 @@ public class EntityProtocol implements ClientProtocolTemplate { static Entity spawnItem(EntityMessage message){ LoggerInterface.loggerNetworking.DEBUG("[CLIENT] Spawn Item " + message.getentityID() + " at " + message.getpositionX() + " " + message.getpositionY() + " " + message.getpositionZ()); //spawn item - String itemType = message.getcreatureTemplate(); + String itemType = message.getentitySubtype(); Entity newlySpawnedEntity = ItemUtils.clientSpawnBasicItem(itemType); //position ClientEntityUtils.initiallyPositionEntity( @@ -280,7 +280,7 @@ public class EntityProtocol implements ClientProtocolTemplate { static Entity spawnCommon(EntityMessage message){ LoggerInterface.loggerNetworking.DEBUG("[CLIENT] Spawn object " + message.getentityID() + " at " + message.getpositionX() + " " + message.getpositionY() + " " + message.getpositionZ()); //spawn item - String objectType = message.getcreatureTemplate(); + String objectType = message.getentitySubtype(); Entity newlySpawnedEntity = CommonEntityUtils.clientSpawnBasicObject(objectType); //position ClientEntityUtils.initiallyPositionEntity( diff --git a/src/main/java/electrosphere/renderer/pipelines/FirstPersonItemsPipeline.java b/src/main/java/electrosphere/renderer/pipelines/FirstPersonItemsPipeline.java index 8cf148d8..46edb784 100644 --- a/src/main/java/electrosphere/renderer/pipelines/FirstPersonItemsPipeline.java +++ b/src/main/java/electrosphere/renderer/pipelines/FirstPersonItemsPipeline.java @@ -11,9 +11,9 @@ import electrosphere.client.entity.camera.CameraEntityUtils; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.client.firstPerson.FirstPersonTree; import electrosphere.entity.state.equip.ClientEquipState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.renderer.OpenGLState; import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.actor.Actor; diff --git a/src/main/java/electrosphere/renderer/pipelines/MainContentPipeline.java b/src/main/java/electrosphere/renderer/pipelines/MainContentPipeline.java index c85d999f..ee27156f 100644 --- a/src/main/java/electrosphere/renderer/pipelines/MainContentPipeline.java +++ b/src/main/java/electrosphere/renderer/pipelines/MainContentPipeline.java @@ -14,7 +14,7 @@ import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; -import electrosphere.entity.types.attach.AttachUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.renderer.OpenGLState; import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.RenderingEngine; diff --git a/src/main/java/electrosphere/server/collision/ServerHitboxResolutionCallback.java b/src/main/java/electrosphere/server/collision/ServerHitboxResolutionCallback.java index 7c345342..931645b8 100644 --- a/src/main/java/electrosphere/server/collision/ServerHitboxResolutionCallback.java +++ b/src/main/java/electrosphere/server/collision/ServerHitboxResolutionCallback.java @@ -7,12 +7,12 @@ import org.ode4j.ode.DGeom; import electrosphere.collision.CollisionEngine.CollisionResolutionCallback; import electrosphere.collision.collidable.Collidable; import electrosphere.entity.Entity; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.attack.ServerAttackTree; import electrosphere.entity.state.hitbox.HitboxCollectionState; import electrosphere.entity.state.hitbox.HitboxCollectionState.HitboxState; import electrosphere.entity.state.hitbox.HitboxCollectionState.HitboxType; import electrosphere.entity.state.life.ServerLifeTree; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.item.ItemUtils; import electrosphere.logger.LoggerInterface; diff --git a/src/main/java/electrosphere/server/datacell/Realm.java b/src/main/java/electrosphere/server/datacell/Realm.java index cdfeba3a..fc22f1e5 100644 --- a/src/main/java/electrosphere/server/datacell/Realm.java +++ b/src/main/java/electrosphere/server/datacell/Realm.java @@ -4,7 +4,7 @@ import electrosphere.collision.CollisionEngine; import electrosphere.collision.hitbox.HitboxManager; import electrosphere.engine.Globals; import electrosphere.entity.Entity; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; import electrosphere.game.server.world.ServerWorldData; import electrosphere.net.parser.net.message.NetworkMessage; import electrosphere.script.ScriptEngine; diff --git a/src/main/java/electrosphere/server/datacell/ServerDataCell.java b/src/main/java/electrosphere/server/datacell/ServerDataCell.java index ed10f96d..68135b6b 100644 --- a/src/main/java/electrosphere/server/datacell/ServerDataCell.java +++ b/src/main/java/electrosphere/server/datacell/ServerDataCell.java @@ -2,7 +2,7 @@ package electrosphere.server.datacell; import electrosphere.engine.Globals; import electrosphere.entity.Entity; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; import electrosphere.entity.types.EntityTypes.EntityType; import electrosphere.entity.types.common.CommonEntityUtils; import electrosphere.entity.types.creature.CreatureUtils; diff --git a/src/main/java/electrosphere/server/datacell/ViewportDataCellManager.java b/src/main/java/electrosphere/server/datacell/ViewportDataCellManager.java index da3c55d2..da65b4d5 100644 --- a/src/main/java/electrosphere/server/datacell/ViewportDataCellManager.java +++ b/src/main/java/electrosphere/server/datacell/ViewportDataCellManager.java @@ -7,7 +7,7 @@ import org.joml.Vector3d; import org.joml.Vector3i; import electrosphere.engine.Globals; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; import electrosphere.net.server.player.Player; import electrosphere.server.datacell.interfaces.DataCellManager; diff --git a/src/main/java/electrosphere/server/saves/Save.java b/src/main/java/electrosphere/server/saves/Save.java index 223680ce..f48ad502 100644 --- a/src/main/java/electrosphere/server/saves/Save.java +++ b/src/main/java/electrosphere/server/saves/Save.java @@ -2,7 +2,7 @@ package electrosphere.server.saves; import java.util.List; -import electrosphere.entity.Scene; +import electrosphere.entity.scene.Scene; /** * Top level save object that stores information about the save diff --git a/src/main/java/electrosphere/server/simulation/MicroSimulation.java b/src/main/java/electrosphere/server/simulation/MicroSimulation.java index 17615f24..f8447419 100644 --- a/src/main/java/electrosphere/server/simulation/MicroSimulation.java +++ b/src/main/java/electrosphere/server/simulation/MicroSimulation.java @@ -1,13 +1,12 @@ package electrosphere.server.simulation; -import electrosphere.entity.types.attach.AttachUtils; - import java.util.Set; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityTags; import electrosphere.entity.EntityUtils; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.collidable.ServerCollidableTree; import electrosphere.entity.types.item.ItemUtils; import electrosphere.server.datacell.ServerDataCell; diff --git a/src/test/java/electrosphere/entity/state/equip/ClientEquipStateTests.java b/src/test/java/electrosphere/entity/state/equip/ClientEquipStateTests.java index 6c6ad673..ed9b0afb 100644 --- a/src/test/java/electrosphere/entity/state/equip/ClientEquipStateTests.java +++ b/src/test/java/electrosphere/entity/state/equip/ClientEquipStateTests.java @@ -12,9 +12,9 @@ import electrosphere.test.annotations.IntegrationTest; import electrosphere.engine.Globals; import electrosphere.entity.Entity; import electrosphere.entity.EntityTags; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.inventory.InventoryUtils; import electrosphere.entity.state.inventory.UnrelationalInventoryState; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureTemplate; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; diff --git a/src/test/java/electrosphere/entity/state/equip/ServerEquipStateTests.java b/src/test/java/electrosphere/entity/state/equip/ServerEquipStateTests.java index bff6be4f..e7c0b8cf 100644 --- a/src/test/java/electrosphere/entity/state/equip/ServerEquipStateTests.java +++ b/src/test/java/electrosphere/entity/state/equip/ServerEquipStateTests.java @@ -11,8 +11,8 @@ import org.joml.Vector3d; import electrosphere.test.annotations.IntegrationTest; import electrosphere.engine.Globals; import electrosphere.entity.Entity; +import electrosphere.entity.state.attach.AttachUtils; import electrosphere.entity.state.inventory.InventoryUtils; -import electrosphere.entity.types.attach.AttachUtils; import electrosphere.entity.types.creature.CreatureTemplate; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.item.ItemUtils; diff --git a/src/test/java/electrosphere/entity/types/attach/AttachUtilsUnitTests.java b/src/test/java/electrosphere/entity/types/attach/AttachUtilsUnitTests.java index 7c86230f..538489f3 100644 --- a/src/test/java/electrosphere/entity/types/attach/AttachUtilsUnitTests.java +++ b/src/test/java/electrosphere/entity/types/attach/AttachUtilsUnitTests.java @@ -7,6 +7,7 @@ import electrosphere.test.annotations.UnitTest; import electrosphere.entity.Entity; import electrosphere.entity.EntityCreationUtils; import electrosphere.entity.EntityDataStrings; +import electrosphere.entity.state.attach.AttachUtils; /** * Unit tests for attach utils