Renderer/src/main/java/electrosphere/entity/ClientEntityUtils.java
austin d41f3f2b16
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
synchronization rotation fix
2024-08-16 18:11:59 -04:00

36 lines
863 B
Java

package electrosphere.entity;
import org.joml.Quaterniond;
import org.joml.Vector3d;
import electrosphere.entity.types.collision.CollisionObjUtils;
/**
* Client only entity utility functions
*/
public class ClientEntityUtils {
/**
* Called when the creature is first spawned to serialize to all people in its initial chunk
* @param entity
* @param position
*/
public static void initiallyPositionEntity(Entity entity, Vector3d position, Quaterniond rotation){
//reposition entity
CollisionObjUtils.clientPositionCharacter(entity, position, rotation);
}
/**
* Destroys an entity on the client
* @param entity the entity to destroy
*/
public static void destroyEntity(Entity entity){
//deregister all behavior trees
EntityUtils.cleanUpEntity(entity);
}
}