This commit is contained in:
parent
69429d70a4
commit
44e79171a8
@ -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
|
Fix generating rendering geometry for blocks/terrain with 0 elements
|
||||||
GriddedDataCellManager filtering optimization
|
GriddedDataCellManager filtering optimization
|
||||||
StandardUniformManager implementation
|
StandardUniformManager implementation
|
||||||
|
Small fixes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,6 +43,7 @@ public class ScriptLevelEditorUtils {
|
|||||||
cursorPos = new Vector3d(centerPos).add(new Vector3d(eyePos).normalize().mul(-CollisionEngine.DEFAULT_INTERACT_DISTANCE));
|
cursorPos = new Vector3d(centerPos).add(new Vector3d(eyePos).normalize().mul(-CollisionEngine.DEFAULT_INTERACT_DISTANCE));
|
||||||
}
|
}
|
||||||
cursorPos = cursorPos.add(cursorVerticalOffset);
|
cursorPos = cursorPos.add(cursorVerticalOffset);
|
||||||
|
realm.getServerWorldData().clampWithinBounds(cursorPos);
|
||||||
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, Globals.clientState.selectedSpawntype.getId(), null);
|
CreatureUtils.serverSpawnBasicCreature(realm, cursorPos, Globals.clientState.selectedSpawntype.getId(), null);
|
||||||
} else if(Globals.clientState.selectedSpawntype instanceof Item){
|
} else if(Globals.clientState.selectedSpawntype instanceof Item){
|
||||||
LoggerInterface.loggerEngine.INFO("spawn " + Globals.clientState.selectedSpawntype.getId() + "!");
|
LoggerInterface.loggerEngine.INFO("spawn " + Globals.clientState.selectedSpawntype.getId() + "!");
|
||||||
|
|||||||
@ -14,22 +14,22 @@ public class NonproceduralModel {
|
|||||||
/**
|
/**
|
||||||
* The path to the model
|
* The path to the model
|
||||||
*/
|
*/
|
||||||
String path;
|
private String path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The idle data for the model
|
* The idle data for the model
|
||||||
*/
|
*/
|
||||||
IdleData idleData;
|
private IdleData idleData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uniform values set ahead of time
|
* 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
|
* 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
|
* Gets the path of the model
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class Profiler {
|
|||||||
/**
|
/**
|
||||||
* Pointer to the global instance
|
* Pointer to the global instance
|
||||||
*/
|
*/
|
||||||
long pointer = -1;
|
private long pointer = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the profiler
|
* Creates the profiler
|
||||||
|
|||||||
@ -430,6 +430,22 @@ public class ServerWorldData {
|
|||||||
realPos.z - realPos.z % BlockChunkData.BLOCK_SIZE_MULTIPLIER
|
realPos.z - realPos.z % BlockChunkData.BLOCK_SIZE_MULTIPLIER
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Gets the terrain manager for this world
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user