recipe work + ServerEntityUtils move method work
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
29e7e3db00
commit
3b8ed5b192
@ -1,39 +1,6 @@
|
||||
{
|
||||
"recipes": [
|
||||
{
|
||||
"id": 0,
|
||||
"displayName": "Katana (Two Hand)",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "katana2H",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"itemType": "katana2H",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"displayName": "Katana (One Hand)",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "katana",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"itemType": "katana",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"displayName": "Workbench",
|
||||
"ingredients": [
|
||||
{
|
||||
@ -50,6 +17,6 @@
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
|
||||
"Data/game/recipes/weapons.json"
|
||||
]
|
||||
}
|
||||
37
assets/Data/game/recipes/weapons.json
Normal file
37
assets/Data/game/recipes/weapons.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"recipes": [
|
||||
{
|
||||
"displayName": "Katana (Two Hand)",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "katana2H",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"itemType": "katana2H",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"displayName": "Katana (One Hand)",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "katana",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"itemType": "katana",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
|
||||
]
|
||||
}
|
||||
@ -1441,6 +1441,8 @@ ServerEntityUtils move entity function properly transfers entity tags now
|
||||
Fix ServerAttackTree freezing bug
|
||||
Fix visually attaching item on server creating item at 0,0,0 on init (thereby creating a new datacell if its not nearby)
|
||||
Fix test failure debug render writing to file
|
||||
Recursive recipe data files
|
||||
ServerEntityUtils recursive move function potential bugfix
|
||||
|
||||
|
||||
|
||||
|
||||
@ -120,6 +120,9 @@ public class ServerEntityUtils {
|
||||
if(AttachUtils.hasChildren(entity)){
|
||||
List<Entity> children = AttachUtils.getChildrenList(entity);
|
||||
for(Entity child : children){
|
||||
if(Globals.realmManager.getEntityRealm(child) == null){
|
||||
continue;
|
||||
}
|
||||
ServerEntityUtils.repositionEntityRecursive(realm, child, position);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,11 @@ import electrosphere.util.FileUtils;
|
||||
* A structure for efficiently looking up recipes
|
||||
*/
|
||||
public class RecipeDataMap {
|
||||
|
||||
/**
|
||||
* Incrementer for assigning IDs to recipes
|
||||
*/
|
||||
static int idIncrementer = 0;
|
||||
|
||||
/**
|
||||
* The map of recipe id -> recipe data
|
||||
@ -64,6 +69,8 @@ public class RecipeDataMap {
|
||||
//push the types from this file
|
||||
for(RecipeData type : loaderFile.getRecipes()){
|
||||
typeList.add(type);
|
||||
type.setId(idIncrementer);
|
||||
idIncrementer++;
|
||||
}
|
||||
//push types from any other files
|
||||
for(String filepath : loaderFile.getFiles()){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user