This commit is contained in:
parent
388f622c9b
commit
32d9725f1e
@ -5,6 +5,7 @@
|
|||||||
"Data/entity/foliage/grass.json",
|
"Data/entity/foliage/grass.json",
|
||||||
"Data/entity/foliage/trees.json",
|
"Data/entity/foliage/trees.json",
|
||||||
"Data/entity/foliage/bushes.json",
|
"Data/entity/foliage/bushes.json",
|
||||||
"Data/entity/foliage/rocks.json"
|
"Data/entity/foliage/rocks.json",
|
||||||
|
"Data/entity/foliage/flowers.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
28
assets/Data/entity/foliage/flowers.json
Normal file
28
assets/Data/entity/foliage/flowers.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"foliageList" : [
|
||||||
|
{
|
||||||
|
"id" : "flower1",
|
||||||
|
"tokens" : [
|
||||||
|
"FLAMMABLE"
|
||||||
|
],
|
||||||
|
"hitboxes" : [
|
||||||
|
{
|
||||||
|
"type": "hurt",
|
||||||
|
"offset": [0, 0.6, 0],
|
||||||
|
"radius": 0.35
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"healthSystem" : {
|
||||||
|
"maxHealth" : 5,
|
||||||
|
"onDamageIFrames" : 0
|
||||||
|
},
|
||||||
|
"graphicsTemplate": {
|
||||||
|
"model": {
|
||||||
|
"path" : "Models/foliage/flowers/Flower_3_Group.gltf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files" : [
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -7,6 +7,11 @@
|
|||||||
"x" : 100,
|
"x" : 100,
|
||||||
"y" : 100,
|
"y" : 100,
|
||||||
"z" : 100
|
"z" : 100
|
||||||
|
},
|
||||||
|
"placementOffset" : {
|
||||||
|
"x" : 0,
|
||||||
|
"y" : -1,
|
||||||
|
"z" : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
BIN
assets/Models/foliage/flowers/Flower_3_Group.bin
Normal file
BIN
assets/Models/foliage/flowers/Flower_3_Group.bin
Normal file
Binary file not shown.
254
assets/Models/foliage/flowers/Flower_3_Group.gltf
Normal file
254
assets/Models/foliage/flowers/Flower_3_Group.gltf
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
{
|
||||||
|
"asset":{
|
||||||
|
"generator":"Khronos glTF Blender I/O v4.0.44",
|
||||||
|
"version":"2.0"
|
||||||
|
},
|
||||||
|
"scene":0,
|
||||||
|
"scenes":[
|
||||||
|
{
|
||||||
|
"name":"Scene",
|
||||||
|
"nodes":[
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"nodes":[
|
||||||
|
{
|
||||||
|
"mesh":0,
|
||||||
|
"name":"Flower_3_Group"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"materials":[
|
||||||
|
{
|
||||||
|
"alphaCutoff":0.20000000298023224,
|
||||||
|
"alphaMode":"MASK",
|
||||||
|
"doubleSided":true,
|
||||||
|
"name":"Leaves",
|
||||||
|
"pbrMetallicRoughness":{
|
||||||
|
"baseColorTexture":{
|
||||||
|
"index":0
|
||||||
|
},
|
||||||
|
"metallicFactor":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alphaCutoff":0.20000000298023224,
|
||||||
|
"alphaMode":"MASK",
|
||||||
|
"doubleSided":true,
|
||||||
|
"name":"Flowers",
|
||||||
|
"pbrMetallicRoughness":{
|
||||||
|
"baseColorTexture":{
|
||||||
|
"index":1
|
||||||
|
},
|
||||||
|
"metallicFactor":0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meshes":[
|
||||||
|
{
|
||||||
|
"name":"Plane.021",
|
||||||
|
"primitives":[
|
||||||
|
{
|
||||||
|
"attributes":{
|
||||||
|
"COLOR_0":0,
|
||||||
|
"POSITION":1,
|
||||||
|
"NORMAL":2,
|
||||||
|
"TEXCOORD_0":3
|
||||||
|
},
|
||||||
|
"indices":4,
|
||||||
|
"material":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attributes":{
|
||||||
|
"COLOR_0":5,
|
||||||
|
"POSITION":6,
|
||||||
|
"NORMAL":7,
|
||||||
|
"TEXCOORD_0":8
|
||||||
|
},
|
||||||
|
"indices":9,
|
||||||
|
"material":1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"textures":[
|
||||||
|
{
|
||||||
|
"sampler":0,
|
||||||
|
"source":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sampler":0,
|
||||||
|
"source":1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"images":[
|
||||||
|
{
|
||||||
|
"mimeType":"image/png",
|
||||||
|
"name":"Leaves",
|
||||||
|
"uri":"Leaves.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mimeType":"image/png",
|
||||||
|
"name":"Flowers",
|
||||||
|
"uri":"Flowers.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"accessors":[
|
||||||
|
{
|
||||||
|
"bufferView":0,
|
||||||
|
"componentType":5123,
|
||||||
|
"count":533,
|
||||||
|
"normalized":true,
|
||||||
|
"type":"VEC4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":1,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":533,
|
||||||
|
"max":[
|
||||||
|
0.7883017063140869,
|
||||||
|
1.7742599248886108,
|
||||||
|
0.7045559287071228
|
||||||
|
],
|
||||||
|
"min":[
|
||||||
|
-0.568230926990509,
|
||||||
|
-0.03458359092473984,
|
||||||
|
-0.5427353382110596
|
||||||
|
],
|
||||||
|
"type":"VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":2,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":533,
|
||||||
|
"type":"VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":3,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":533,
|
||||||
|
"type":"VEC2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":4,
|
||||||
|
"componentType":5123,
|
||||||
|
"count":2130,
|
||||||
|
"type":"SCALAR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":5,
|
||||||
|
"componentType":5123,
|
||||||
|
"count":48,
|
||||||
|
"normalized":true,
|
||||||
|
"type":"VEC4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":6,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":48,
|
||||||
|
"max":[
|
||||||
|
0.8748752474784851,
|
||||||
|
2.020251512527466,
|
||||||
|
0.789365291595459
|
||||||
|
],
|
||||||
|
"min":[
|
||||||
|
-0.6136013269424438,
|
||||||
|
1.4516462087631226,
|
||||||
|
-0.8017617464065552
|
||||||
|
],
|
||||||
|
"type":"VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":7,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":48,
|
||||||
|
"type":"VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":8,
|
||||||
|
"componentType":5126,
|
||||||
|
"count":48,
|
||||||
|
"type":"VEC2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView":9,
|
||||||
|
"componentType":5123,
|
||||||
|
"count":135,
|
||||||
|
"type":"SCALAR"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bufferViews":[
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":4264,
|
||||||
|
"byteOffset":0,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":6396,
|
||||||
|
"byteOffset":4264,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":6396,
|
||||||
|
"byteOffset":10660,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":4264,
|
||||||
|
"byteOffset":17056,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":4260,
|
||||||
|
"byteOffset":21320,
|
||||||
|
"target":34963
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":384,
|
||||||
|
"byteOffset":25580,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":576,
|
||||||
|
"byteOffset":25964,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":576,
|
||||||
|
"byteOffset":26540,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":384,
|
||||||
|
"byteOffset":27116,
|
||||||
|
"target":34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer":0,
|
||||||
|
"byteLength":270,
|
||||||
|
"byteOffset":27500,
|
||||||
|
"target":34963
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"samplers":[
|
||||||
|
{
|
||||||
|
"magFilter":9729,
|
||||||
|
"minFilter":9987
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buffers":[
|
||||||
|
{
|
||||||
|
"byteLength":27772,
|
||||||
|
"uri":"Flower_3_Group.bin"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
assets/Models/foliage/flowers/Flowers.png
Normal file
BIN
assets/Models/foliage/flowers/Flowers.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 434 KiB |
BIN
assets/Models/foliage/flowers/Leaves.png
Normal file
BIN
assets/Models/foliage/flowers/Leaves.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
@ -8,8 +8,11 @@
|
|||||||
|
|
||||||
+ feedback driven requirements
|
+ feedback driven requirements
|
||||||
Spawn a town in macro data
|
Spawn a town in macro data
|
||||||
- Place a building
|
- Ability to modify elevation data to facilitate structure placement
|
||||||
- Elevation calls give you the ACTUAL elevation
|
Improve voxel editing tools
|
||||||
|
- Fix cursor alignment for fabs
|
||||||
|
- Fix weirdness with placing fabs near edges of previous voxels
|
||||||
|
- Fix cursor alignment generally
|
||||||
Crouching
|
Crouching
|
||||||
Model clothing, hair for the human
|
Model clothing, hair for the human
|
||||||
particles, light on sword collision
|
particles, light on sword collision
|
||||||
|
|||||||
@ -1597,6 +1597,8 @@ Fix server loading full res chunks from disk as strided chunks
|
|||||||
Debugging tooling for foliage manager
|
Debugging tooling for foliage manager
|
||||||
Refactor ProceduralChunkGenerator
|
Refactor ProceduralChunkGenerator
|
||||||
NoiseVoxelGen work to make elevation values align with voxel values that are generated
|
NoiseVoxelGen work to make elevation values align with voxel values that are generated
|
||||||
|
Non-procedural voxel generation fix
|
||||||
|
Flower foliage item
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -162,7 +162,7 @@ public class CommonEntityUtils {
|
|||||||
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getPath() != null && EntityUtils.getActor(entity) == null && generateDrawable == true){
|
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getPath() != null && EntityUtils.getActor(entity) == null && generateDrawable == true){
|
||||||
EntityCreationUtils.makeEntityDrawable(entity, graphicsTemplate.getModel().getPath());
|
EntityCreationUtils.makeEntityDrawable(entity, graphicsTemplate.getModel().getPath());
|
||||||
}
|
}
|
||||||
//idle tree & generic stuff all creatures have
|
//idle tree & generic stuff all entities have
|
||||||
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getIdleData() != null){
|
if(graphicsTemplate.getModel() != null && graphicsTemplate.getModel().getIdleData() != null){
|
||||||
ClientIdleTree.attachTree(entity, graphicsTemplate.getModel().getIdleData());
|
ClientIdleTree.attachTree(entity, graphicsTemplate.getModel().getIdleData());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,11 @@ public class StructureData {
|
|||||||
*/
|
*/
|
||||||
Vector3d dimensions;
|
Vector3d dimensions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offset when placing the structure (ie to place a foundation underneath the terrain)
|
||||||
|
*/
|
||||||
|
Vector3d placementOffset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the id of the structure
|
* Sets the id of the structure
|
||||||
* @return The id
|
* @return The id
|
||||||
@ -62,6 +67,21 @@ public class StructureData {
|
|||||||
this.dimensions = dimensions;
|
this.dimensions = dimensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the placement offset
|
||||||
|
* @return The placemeng offset
|
||||||
|
*/
|
||||||
|
public Vector3d getPlacementOffset() {
|
||||||
|
return placementOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the placement offset
|
||||||
|
* @param placementOffset The placement offset
|
||||||
|
*/
|
||||||
|
public void setPlacementOffset(Vector3d placementOffset) {
|
||||||
|
this.placementOffset = placementOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,6 +97,11 @@ public class Actor {
|
|||||||
* Stores the rotations of bones as they are updated
|
* Stores the rotations of bones as they are updated
|
||||||
*/
|
*/
|
||||||
Map<String,Quaterniond> boneRotationMap = new HashMap<String,Quaterniond>();
|
Map<String,Quaterniond> boneRotationMap = new HashMap<String,Quaterniond>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets scaling applied at the actor level
|
||||||
|
*/
|
||||||
|
float scale = 1.0f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an achor
|
* Creates an achor
|
||||||
@ -754,5 +759,20 @@ public class Actor {
|
|||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the scaling applied by the actor
|
||||||
|
* @return The scaling
|
||||||
|
*/
|
||||||
|
public float getScale() {
|
||||||
|
return scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the scaling applied by the actor
|
||||||
|
* @param scale The scaling
|
||||||
|
*/
|
||||||
|
public void setScale(float scale) {
|
||||||
|
this.scale = scale;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,6 +159,10 @@ public class ServerBlockChunkGenerationThread implements Runnable {
|
|||||||
* @param worldZ The world z coordinate
|
* @param worldZ The world z coordinate
|
||||||
*/
|
*/
|
||||||
protected static void generate(BlockChunkData chunk, MacroData macroData, int worldX, int worldY, int worldZ){
|
protected static void generate(BlockChunkData chunk, MacroData macroData, int worldX, int worldY, int worldZ){
|
||||||
|
if(macroData == null){
|
||||||
|
chunk.setHomogenousValue(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
//check if this chunk intersects any macro data
|
//check if this chunk intersects any macro data
|
||||||
AABBd localAABB = new AABBd(ServerWorldData.convertChunkToRealSpace(worldX,worldY,worldZ),ServerWorldData.convertChunkToRealSpace(worldX+1,worldY+1,worldZ+1));
|
AABBd localAABB = new AABBd(ServerWorldData.convertChunkToRealSpace(worldX,worldY,worldZ),ServerWorldData.convertChunkToRealSpace(worldX+1,worldY+1,worldZ+1));
|
||||||
List<Structure> filtered = macroData.getStructures().stream().filter((Structure struct) -> {return struct.getAABB().testAABB(localAABB);}).collect(Collectors.toList());
|
List<Structure> filtered = macroData.getStructures().stream().filter((Structure struct) -> {return struct.getAABB().testAABB(localAABB);}).collect(Collectors.toList());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user