new items + serverentityutils update
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2d55b16119
commit
52010d8b5a
@ -25,6 +25,58 @@
|
||||
"offsetZ" : 0
|
||||
},
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Rock",
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
"TARGETABLE"
|
||||
],
|
||||
"graphicsTemplate": {
|
||||
"model": {
|
||||
"path" : "Models/items/materials/rock1.glb"
|
||||
}
|
||||
},
|
||||
"collidable": {
|
||||
"type" : "CUBE",
|
||||
"dimension1" : 0.1,
|
||||
"dimension2" : 0.1,
|
||||
"dimension3" : 0.35,
|
||||
"rotX": 0,
|
||||
"rotY": 0,
|
||||
"rotZ": 0,
|
||||
"rotW": 1,
|
||||
"offsetX" : 0,
|
||||
"offsetY" : 0.05,
|
||||
"offsetZ" : 0
|
||||
},
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Stick",
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
"TARGETABLE"
|
||||
],
|
||||
"graphicsTemplate": {
|
||||
"model": {
|
||||
"path" : "Models/items/materials/stick1.glb"
|
||||
}
|
||||
},
|
||||
"collidable": {
|
||||
"type" : "CUBE",
|
||||
"dimension1" : 0.1,
|
||||
"dimension2" : 0.1,
|
||||
"dimension3" : 0.35,
|
||||
"rotX": 0,
|
||||
"rotY": 0,
|
||||
"rotZ": 0,
|
||||
"rotW": 1,
|
||||
"offsetX" : 0,
|
||||
"offsetY" : 0.05,
|
||||
"offsetZ" : 0
|
||||
},
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
}
|
||||
],
|
||||
"files" : [
|
||||
|
||||
BIN
assets/Models/items/materials/rock1.glb
Normal file
BIN
assets/Models/items/materials/rock1.glb
Normal file
Binary file not shown.
BIN
assets/Models/items/materials/stick1.glb
Normal file
BIN
assets/Models/items/materials/stick1.glb
Normal file
Binary file not shown.
@ -6,6 +6,20 @@
|
||||
"diffuse" : "/Models/items/materials/logmodel.png",
|
||||
"isDefault" : true
|
||||
}
|
||||
],
|
||||
"Models/items/materials/stick1.glb": [
|
||||
{
|
||||
"meshName" : "Cylinder",
|
||||
"diffuse" : "/Textures/wooden.png",
|
||||
"isDefault" : true
|
||||
}
|
||||
],
|
||||
"Models/items/materials/rock1.glb": [
|
||||
{
|
||||
"meshName" : "Cylinder",
|
||||
"diffuse" : "/Textures/Ground/rock3_256.png",
|
||||
"isDefault" : true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1418,6 +1418,10 @@ Lore message resend from client on failure
|
||||
More surface selection work
|
||||
Noise control from biome definition
|
||||
|
||||
(04/03/2025)
|
||||
Add rock and stick items
|
||||
Update ServerEntityUtils.repositionEntityRecursive behavior
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -113,14 +113,14 @@ public class ServerEntityUtils {
|
||||
}
|
||||
ServerDataCell.moveEntityFromCellToCell(entity, oldDataCell, newDataCell);
|
||||
ServerBehaviorTreeUtils.updateCell(entity, oldDataCell);
|
||||
if(oldDataCell.getScene().containsEntity(entity)){
|
||||
if(oldDataCell != null && oldDataCell.getScene().containsEntity(entity)){
|
||||
throw new Error("Entity not removed from scene!");
|
||||
}
|
||||
}
|
||||
if(AttachUtils.hasChildren(entity)){
|
||||
List<Entity> children = AttachUtils.getChildrenList(entity);
|
||||
for(Entity child : children){
|
||||
repositionEntityRecursive(realm, child, position);
|
||||
ServerEntityUtils.repositionEntityRecursive(realm, child, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,14 +186,13 @@ public class ServerDataCell {
|
||||
if(entity == null){
|
||||
throw new Error("Passed null entity! " + entity);
|
||||
}
|
||||
if(oldCell == null){
|
||||
throw new Error("Passed null oldCell! " + oldCell);
|
||||
}
|
||||
if(newCell == null){
|
||||
throw new Error("Passed null newCell! " + newCell);
|
||||
}
|
||||
//swap which holds the entity
|
||||
if(oldCell != null){
|
||||
oldCell.getScene().deregisterEntity(entity);
|
||||
}
|
||||
newCell.getScene().registerEntity(entity);
|
||||
//update entity data cell mapper
|
||||
Globals.entityDataCellMapper.updateEntityCell(entity, newCell);
|
||||
@ -212,6 +211,7 @@ public class ServerDataCell {
|
||||
}
|
||||
}
|
||||
//delete the entity for players that dont care about it
|
||||
if(oldCell != null){
|
||||
for(Player player : oldCell.activePlayers){
|
||||
if(
|
||||
!newCell.containsPlayer(player) &&
|
||||
@ -222,6 +222,7 @@ public class ServerDataCell {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scene backing this data cell
|
||||
|
||||
Loading…
Reference in New Issue
Block a user