more refactoring of server
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-04-16 12:33:03 -04:00
parent 522910b64f
commit 142cc7d15c
37 changed files with 37 additions and 118 deletions

View File

@ -1507,6 +1507,7 @@ Terrain editing/saving work
(04/16/2025) (04/16/2025)
Refactoring server classes under physics package Refactoring server classes under physics package
Refactoring server classes under entity package

View File

@ -38,8 +38,8 @@ import electrosphere.renderer.model.Model;
import electrosphere.renderer.ui.imgui.ImGuiWindow; import electrosphere.renderer.ui.imgui.ImGuiWindow;
import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback; import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback;
import electrosphere.server.datacell.utils.EntityLookupUtils; import electrosphere.server.datacell.utils.EntityLookupUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.server.poseactor.PoseModel; import electrosphere.server.entity.poseactor.PoseModel;
import imgui.ImGui; import imgui.ImGui;
/** /**

View File

@ -37,9 +37,9 @@ import electrosphere.renderer.ui.elementtypes.ContainerElement.YogaFlexDirection
import electrosphere.renderer.ui.elementtypes.ContainerElement.YogaJustification; import electrosphere.renderer.ui.elementtypes.ContainerElement.YogaJustification;
import electrosphere.renderer.ui.events.NavigationEvent; import electrosphere.renderer.ui.events.NavigationEvent;
import electrosphere.renderer.ui.events.ValueChangeEvent; import electrosphere.renderer.ui.events.ValueChangeEvent;
import electrosphere.server.content.unit.UnitUtils;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.utils.EntityLookupUtils; import electrosphere.server.datacell.utils.EntityLookupUtils;
import electrosphere.server.entity.unit.UnitUtils;
/** /**
* Menu generators for level editor * Menu generators for level editor

View File

@ -83,8 +83,8 @@ import electrosphere.server.ai.AIManager;
import electrosphere.server.datacell.EntityDataCellMapper; import electrosphere.server.datacell.EntityDataCellMapper;
import electrosphere.server.datacell.RealmManager; import electrosphere.server.datacell.RealmManager;
import electrosphere.server.db.DatabaseController; import electrosphere.server.db.DatabaseController;
import electrosphere.server.entity.poseactor.PoseModel;
import electrosphere.server.pathfinding.NavMeshManager; import electrosphere.server.pathfinding.NavMeshManager;
import electrosphere.server.poseactor.PoseModel;
import electrosphere.server.saves.Save; import electrosphere.server.saves.Save;
import electrosphere.server.simulation.MacroSimulation; import electrosphere.server.simulation.MacroSimulation;
import electrosphere.server.simulation.MicroSimulation; import electrosphere.server.simulation.MicroSimulation;

View File

@ -17,7 +17,7 @@ import electrosphere.renderer.shader.ComputeShader;
import electrosphere.renderer.shader.VisualShader; import electrosphere.renderer.shader.VisualShader;
import electrosphere.renderer.texture.Texture; import electrosphere.renderer.texture.Texture;
import electrosphere.renderer.texture.TextureMap; import electrosphere.renderer.texture.TextureMap;
import electrosphere.server.poseactor.PoseModel; import electrosphere.server.entity.poseactor.PoseModel;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
import java.io.File; import java.io.File;

View File

@ -11,7 +11,7 @@ import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.datacell.utils.EntityLookupUtils; import electrosphere.server.datacell.utils.EntityLookupUtils;
import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils;
import electrosphere.server.datacell.utils.ServerEntityTagUtils; import electrosphere.server.datacell.utils.ServerEntityTagUtils;
import electrosphere.server.poseactor.PoseActorUtils; import electrosphere.server.entity.poseactor.PoseActorUtils;
public class EntityCreationUtils { public class EntityCreationUtils {

View File

@ -5,7 +5,7 @@ import electrosphere.renderer.actor.Actor;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.datacell.utils.EntityLookupUtils; import electrosphere.server.datacell.utils.EntityLookupUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import org.joml.Quaterniond; import org.joml.Quaterniond;
import org.joml.Vector3d; import org.joml.Vector3d;

View File

@ -12,7 +12,7 @@ import electrosphere.game.data.common.treedata.TreeDataAudio;
import electrosphere.game.data.common.treedata.TreeDataState; import electrosphere.game.data.common.treedata.TreeDataState;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
/** /**
* For a lot of behavior trees, there are states where we simply want to play an animation (ie a cooldown) * For a lot of behavior trees, there are states where we simply want to play an animation (ie a cooldown)

View File

@ -9,9 +9,9 @@ import electrosphere.entity.types.common.CommonEntityUtils;
import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.creature.CreatureUtils;
import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.item.ItemUtils;
import electrosphere.game.server.world.ServerWorldData; import electrosphere.game.server.world.ServerWorldData;
import electrosphere.server.content.ServerContentManager;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.gridded.GriddedDataCellManager; import electrosphere.server.datacell.gridded.GriddedDataCellManager;
import electrosphere.server.entity.ServerContentManager;
import electrosphere.server.physics.terrain.generation.DefaultChunkGenerator; import electrosphere.server.physics.terrain.generation.DefaultChunkGenerator;
import electrosphere.server.physics.terrain.manager.ServerTerrainChunk; import electrosphere.server.physics.terrain.manager.ServerTerrainChunk;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;

View File

@ -9,7 +9,7 @@ import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.datacell.utils.ServerEntityTagUtils; import electrosphere.server.datacell.utils.ServerEntityTagUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;

View File

@ -42,7 +42,7 @@ import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.datacell.utils.DataCellSearchUtils; import electrosphere.server.datacell.utils.DataCellSearchUtils;
import electrosphere.server.datacell.utils.ServerEntityTagUtils; import electrosphere.server.datacell.utils.ServerEntityTagUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.server.utils.ServerScriptUtils; import electrosphere.server.utils.ServerScriptUtils;
@SynchronizedBehaviorTree(name = "serverEquipState", isServer = true, correspondingTree="clientEquipState") @SynchronizedBehaviorTree(name = "serverEquipState", isServer = true, correspondingTree="clientEquipState")

View File

@ -27,7 +27,7 @@ import electrosphere.game.data.collidable.HitboxData;
import electrosphere.game.data.utils.DataFormatUtil; import electrosphere.game.data.utils.DataFormatUtil;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.util.math.SpatialMathUtils; import electrosphere.util.math.SpatialMathUtils;
/** /**

View File

@ -21,7 +21,7 @@ import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
import electrosphere.net.synchronization.enums.FieldIdEnums; import electrosphere.net.synchronization.enums.FieldIdEnums;
import electrosphere.server.datacell.utils.DataCellSearchUtils; import electrosphere.server.datacell.utils.DataCellSearchUtils;
import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;

View File

@ -10,7 +10,7 @@ import electrosphere.entity.state.gravity.ServerGravityTree;
import electrosphere.entity.state.movement.jump.ServerJumpTree; import electrosphere.entity.state.movement.jump.ServerJumpTree;
import electrosphere.game.data.common.treedata.TreeDataAnimation; import electrosphere.game.data.common.treedata.TreeDataAnimation;
import electrosphere.game.data.creature.type.movement.FallMovementSystem; import electrosphere.game.data.creature.type.movement.FallMovementSystem;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
public class ServerFallTree implements BehaviorTree { public class ServerFallTree implements BehaviorTree {

View File

@ -2,6 +2,7 @@ package electrosphere.entity.state.movement.groundmove;
import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils;
import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.net.parser.net.message.SynchronizationMessage; import electrosphere.net.parser.net.message.SynchronizationMessage;
import electrosphere.entity.state.gravity.GravityUtils; import electrosphere.entity.state.gravity.GravityUtils;
import electrosphere.client.entity.camera.CameraEntityUtils; import electrosphere.client.entity.camera.CameraEntityUtils;
@ -31,7 +32,6 @@ import electrosphere.net.synchronization.enums.FieldIdEnums;
import electrosphere.renderer.anim.Animation; import electrosphere.renderer.anim.Animation;
import electrosphere.script.utils.AccessTransforms; import electrosphere.script.utils.AccessTransforms;
import electrosphere.server.datacell.utils.DataCellSearchUtils; import electrosphere.server.datacell.utils.DataCellSearchUtils;
import electrosphere.server.poseactor.PoseActor;
import electrosphere.server.utils.ServerScriptUtils; import electrosphere.server.utils.ServerScriptUtils;
import electrosphere.util.math.SpatialMathUtils; import electrosphere.util.math.SpatialMathUtils;

View File

@ -2,6 +2,7 @@ package electrosphere.entity.state.movement.jump;
import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils;
import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.net.parser.net.message.SynchronizationMessage; import electrosphere.net.parser.net.message.SynchronizationMessage;
import electrosphere.server.datacell.utils.DataCellSearchUtils; import electrosphere.server.datacell.utils.DataCellSearchUtils;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
@ -21,7 +22,6 @@ import electrosphere.net.synchronization.annotation.SyncedField;
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree; import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums; import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
import electrosphere.net.synchronization.enums.FieldIdEnums; import electrosphere.net.synchronization.enums.FieldIdEnums;
import electrosphere.server.poseactor.PoseActor;
@SynchronizedBehaviorTree(name = "serverJumpTree", isServer = true, correspondingTree="clientJumpTree") @SynchronizedBehaviorTree(name = "serverJumpTree", isServer = true, correspondingTree="clientJumpTree")
/* /*

View File

@ -14,7 +14,7 @@ import electrosphere.entity.EntityUtils;
import electrosphere.entity.btree.BehaviorTree; import electrosphere.entity.btree.BehaviorTree;
import electrosphere.entity.state.view.ViewUtils; import electrosphere.entity.state.view.ViewUtils;
import electrosphere.renderer.actor.ActorBoneRotator; import electrosphere.renderer.actor.ActorBoneRotator;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
public class ServerRotatorTree implements BehaviorTree{ public class ServerRotatorTree implements BehaviorTree{

View File

@ -90,7 +90,7 @@ import electrosphere.renderer.actor.ActorUtils;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils; import electrosphere.server.datacell.utils.ServerBehaviorTreeUtils;
import electrosphere.server.datacell.utils.ServerEntityTagUtils; import electrosphere.server.datacell.utils.ServerEntityTagUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.util.math.SpatialMathUtils; import electrosphere.util.math.SpatialMathUtils;
/** /**

View File

@ -40,7 +40,7 @@ import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorStaticMorph; import electrosphere.renderer.actor.ActorStaticMorph;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.utils.EntityLookupUtils; import electrosphere.server.datacell.utils.EntityLookupUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
import electrosphere.util.Utilities; import electrosphere.util.Utilities;
/** /**

View File

@ -39,7 +39,7 @@ import electrosphere.net.server.player.Player;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.utils.ServerEntityTagUtils; import electrosphere.server.datacell.utils.ServerEntityTagUtils;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
/** /**
* Utilities for working with items * Utilities for working with items

View File

@ -9,8 +9,8 @@ import electrosphere.entity.scene.Scene;
import electrosphere.game.server.world.ServerWorldData; import electrosphere.game.server.world.ServerWorldData;
import electrosphere.net.parser.net.message.NetworkMessage; import electrosphere.net.parser.net.message.NetworkMessage;
import electrosphere.script.ScriptEngine; import electrosphere.script.ScriptEngine;
import electrosphere.server.content.ServerContentManager;
import electrosphere.server.datacell.interfaces.DataCellManager; import electrosphere.server.datacell.interfaces.DataCellManager;
import electrosphere.server.entity.ServerContentManager;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedList; import java.util.LinkedList;

View File

@ -15,8 +15,8 @@ import electrosphere.engine.Globals;
import electrosphere.entity.Entity; import electrosphere.entity.Entity;
import electrosphere.game.server.world.ServerWorldData; import electrosphere.game.server.world.ServerWorldData;
import electrosphere.net.server.player.Player; import electrosphere.net.server.player.Player;
import electrosphere.server.content.ServerContentManager;
import electrosphere.server.datacell.gridded.GriddedDataCellManager; import electrosphere.server.datacell.gridded.GriddedDataCellManager;
import electrosphere.server.entity.ServerContentManager;
import electrosphere.server.physics.chemistry.ServerChemistryCollisionCallback; import electrosphere.server.physics.chemistry.ServerChemistryCollisionCallback;
import electrosphere.server.physics.collision.ServerHitboxResolutionCallback; import electrosphere.server.physics.collision.ServerHitboxResolutionCallback;
import electrosphere.server.physics.fluid.simulator.FluidAcceleratedSimulator; import electrosphere.server.physics.fluid.simulator.FluidAcceleratedSimulator;

View File

@ -29,13 +29,13 @@ import electrosphere.net.parser.net.message.EntityMessage;
import electrosphere.net.parser.net.message.TerrainMessage; import electrosphere.net.parser.net.message.TerrainMessage;
import electrosphere.net.server.player.Player; import electrosphere.net.server.player.Player;
import electrosphere.net.server.protocol.TerrainProtocol; import electrosphere.net.server.protocol.TerrainProtocol;
import electrosphere.server.content.ServerContentManager;
import electrosphere.server.content.serialization.ContentSerialization;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.datacell.interfaces.DataCellManager; import electrosphere.server.datacell.interfaces.DataCellManager;
import electrosphere.server.datacell.interfaces.VoxelCellManager; import electrosphere.server.datacell.interfaces.VoxelCellManager;
import electrosphere.server.datacell.physics.PhysicsDataCell; import electrosphere.server.datacell.physics.PhysicsDataCell;
import electrosphere.server.entity.ServerContentManager;
import electrosphere.server.entity.serialization.ContentSerialization;
import electrosphere.server.physics.block.manager.ServerBlockManager; import electrosphere.server.physics.block.manager.ServerBlockManager;
import electrosphere.server.physics.fluid.manager.ServerFluidChunk; import electrosphere.server.physics.fluid.manager.ServerFluidChunk;
import electrosphere.server.physics.fluid.manager.ServerFluidManager; import electrosphere.server.physics.fluid.manager.ServerFluidManager;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content; package electrosphere.server.entity;
import electrosphere.entity.Entity; import electrosphere.entity.Entity;
import electrosphere.entity.types.foliage.FoliageUtils; import electrosphere.entity.types.foliage.FoliageUtils;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content; package electrosphere.server.entity;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content; package electrosphere.server.entity;
import java.util.Collection; import java.util.Collection;
@ -8,9 +8,9 @@ import electrosphere.engine.Globals;
import electrosphere.entity.Entity; import electrosphere.entity.Entity;
import electrosphere.entity.state.server.ServerCharacterData; import electrosphere.entity.state.server.ServerCharacterData;
import electrosphere.server.character.CharacterService; import electrosphere.server.character.CharacterService;
import electrosphere.server.content.serialization.ContentSerialization;
import electrosphere.server.datacell.Realm; import electrosphere.server.datacell.Realm;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.entity.serialization.ContentSerialization;
import electrosphere.server.saves.SaveUtils; import electrosphere.server.saves.SaveUtils;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
import electrosphere.util.math.HashUtils; import electrosphere.util.math.HashUtils;

View File

@ -1,4 +1,4 @@
package electrosphere.server.poseactor; package electrosphere.server.entity.poseactor;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;

View File

@ -1,4 +1,4 @@
package electrosphere.server.poseactor; package electrosphere.server.entity.poseactor;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;

View File

@ -1,4 +1,4 @@
package electrosphere.server.poseactor; package electrosphere.server.entity.poseactor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content.serialization; package electrosphere.server.entity.serialization;
import java.util.Collection; import java.util.Collection;
import java.util.LinkedList; import java.util.LinkedList;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content.serialization; package electrosphere.server.entity.serialization;
import org.joml.Quaterniond; import org.joml.Quaterniond;
import org.joml.Vector3d; import org.joml.Vector3d;

View File

@ -1,4 +1,4 @@
package electrosphere.server.content.unit; package electrosphere.server.entity.unit;
import org.joml.Vector3d; import org.joml.Vector3d;

View File

@ -1,10 +0,0 @@
package electrosphere.server.gen;
/**
* Generates dungeons
*/
public class DungeonGen {
}

View File

@ -1,23 +0,0 @@
package electrosphere.server.region;
import java.util.List;
import org.joml.Vector3d;
import electrosphere.entity.Entity;
public interface Region {
public static enum RegionType {
REGION_TYPE_CUBOID,
}
public Vector3d getPosition();
public void setPosition(Vector3d position);
public RegionType getRegionType();
public List<Entity> getContainedEntities();
}

View File

@ -1,49 +0,0 @@
package electrosphere.server.region;
import java.util.List;
import org.joml.Vector3d;
import electrosphere.entity.Entity;
public class RegionCuboid implements Region {
Vector3d position;
Vector3d radius;
List<Entity> containedEntities;
public RegionCuboid(Vector3d position, Vector3d radius){
this.position = position;
this.radius = radius;
}
@Override
public Vector3d getPosition() {
return position;
}
@Override
public void setPosition(Vector3d position) {
this.position = position;
}
@Override
public RegionType getRegionType() {
return RegionType.REGION_TYPE_CUBOID;
}
public Vector3d getRadius(){
return radius;
}
public void setRadius(Vector3d radius){
this.radius = radius;
}
@Override
public List<Entity> getContainedEntities() {
return containedEntities;
}
}

View File

@ -10,7 +10,7 @@ import electrosphere.entity.state.attach.AttachUtils;
import electrosphere.entity.state.collidable.ServerCollidableTree; import electrosphere.entity.state.collidable.ServerCollidableTree;
import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.item.ItemUtils;
import electrosphere.server.datacell.ServerDataCell; import electrosphere.server.datacell.ServerDataCell;
import electrosphere.server.poseactor.PoseActor; import electrosphere.server.entity.poseactor.PoseActor;
/** /**
* Server-side micro-scale simulation * Server-side micro-scale simulation

View File

@ -12,7 +12,7 @@ import electrosphere.entity.types.creature.CreatureTemplate;
import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.entity.types.creature.CreatureUtils;
import electrosphere.server.ai.blackboard.Blackboard; import electrosphere.server.ai.blackboard.Blackboard;
import electrosphere.server.ai.nodes.AITreeNode.AITreeNodeResult; import electrosphere.server.ai.nodes.AITreeNode.AITreeNodeResult;
import electrosphere.server.content.unit.UnitUtils; import electrosphere.server.entity.unit.UnitUtils;
import electrosphere.test.template.EntityTestTemplate; import electrosphere.test.template.EntityTestTemplate;
/** /**