small fixes
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-22 22:08:07 -04:00
parent 69429d70a4
commit 44e79171a8
5 changed files with 23 additions and 5 deletions

View File

@ -1943,6 +1943,7 @@ Error checking on mesh rendering (making sure not trying to draw 0-element meshe
Fix generating rendering geometry for blocks/terrain with 0 elements
GriddedDataCellManager filtering optimization
StandardUniformManager implementation
Small fixes

View File

@ -43,6 +43,7 @@ public class ScriptLevelEditorUtils {
cursorPos = new Vector3d(centerPos).add(new Vector3d(eyePos).normalize().mul(-CollisionEngine.DEFAULT_INTERACT_DISTANCE));
}
cursorPos = cursorPos.add(cursorVerticalOffset);
realm.getServerWorldData().clampWithinBounds(cursorPos);
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, Globals.clientState.selectedSpawntype.getId(), null);
} else if(Globals.clientState.selectedSpawntype instanceof Item){
LoggerInterface.loggerEngine.INFO("spawn " + Globals.clientState.selectedSpawntype.getId() + "!");

View File

@ -14,22 +14,22 @@ public class NonproceduralModel {
/**
* The path to the model
*/
String path;
private String path;
/**
* The idle data for the model
*/
IdleData idleData;
private IdleData idleData;
/**
* Uniform values set ahead of time
*/
Map<String,Map<String,Object>> uniforms;
private Map<String,Map<String,Object>> uniforms;
/**
* The map of mesh to color to apply to that mesh
*/
Map<String,Vector3f> meshColorMap;
private Map<String,Vector3f> meshColorMap;
/**
* Gets the path of the model

View File

@ -18,7 +18,7 @@ public class Profiler {
/**
* Pointer to the global instance
*/
long pointer = -1;
private long pointer = -1;
/**
* Creates the profiler

View File

@ -431,6 +431,22 @@ public class ServerWorldData {
);
}
/**
* Clamps a real position within bounds of the world
* @param realPos The real position
*/
public void clampWithinBounds(Vector3d realPos){
if(realPos.x < 0){
realPos.x = 0;
}
if(realPos.y < 0){
realPos.y = 0;
}
if(realPos.z < 0){
realPos.z = 0;
}
}
/**
* Gets the terrain manager for this world
* @return The terrain manager if it exists, null otherwise