Proper transforms for cable and interface items.
This commit is contained in:
@@ -125,12 +125,65 @@ public class BlockStates extends BlockStateProvider {
|
||||
});
|
||||
|
||||
itemModels().getBuilder(Items.BUS_CABLE_ITEM.getId().getPath())
|
||||
.parent(baseModel);
|
||||
.parent(baseModel)
|
||||
.transforms()
|
||||
.transform(ModelBuilder.Perspective.GUI)
|
||||
.rotation(30, 225, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.GROUND)
|
||||
.translation(0, 3, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIXED)
|
||||
.scale(1.0f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.THIRDPERSON_RIGHT)
|
||||
.rotation(75, 45, 0)
|
||||
.translation(0, 2.5f, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIRSTPERSON_RIGHT)
|
||||
.rotation(0, 45, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIRSTPERSON_LEFT)
|
||||
.rotation(0, 225, 0)
|
||||
.scale(0.75f)
|
||||
.end();
|
||||
|
||||
itemModels().getBuilder(Items.BUS_INTERFACE_ITEM.getId().getPath())
|
||||
.parent(plugModel)
|
||||
.transforms()
|
||||
.transform(ModelBuilder.Perspective.GUI)
|
||||
.rotation(0, 90, 0);
|
||||
.rotation(30, 315, 0)
|
||||
.translation(2, 1, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.GROUND)
|
||||
.translation(0, 3, -5)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIXED)
|
||||
.rotation(0, 180, 0)
|
||||
.translation(0, 0, 4)
|
||||
.scale(1.0f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.THIRDPERSON_RIGHT)
|
||||
.rotation(75, 180, 0)
|
||||
.translation(0, -1, 0)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIRSTPERSON_RIGHT)
|
||||
.rotation(0, 180, 0)
|
||||
.translation(0, 0, 2)
|
||||
.scale(0.75f)
|
||||
.end()
|
||||
.transform(ModelBuilder.Perspective.FIRSTPERSON_LEFT)
|
||||
.rotation(0, 180, 0)
|
||||
.translation(0, 0, 2)
|
||||
.scale(0.75f)
|
||||
.end();
|
||||
}
|
||||
|
||||
private <T extends Block> void horizontalBlock(final RegistryObject<T> block, final RegistryObject<Item> item) {
|
||||
|
||||
@@ -2,34 +2,69 @@
|
||||
"parent": "oc2:block/cable_base",
|
||||
"display": {
|
||||
"gui": {
|
||||
"rotation": [ 30, 225, 0 ],
|
||||
"translation": [ 0, 0, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
30,
|
||||
225,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"ground": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 0, 0 ],
|
||||
"scale": [ 1.0, 1.0, 1.0 ]
|
||||
"translation": [
|
||||
0,
|
||||
3,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
75,
|
||||
45,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
2.5,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"translation": [ 0, 0, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
0,
|
||||
45,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 225, 0 ],
|
||||
"translation": [ 0, 0, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
0,
|
||||
225,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,34 +2,96 @@
|
||||
"parent": "oc2:block/cable_plug",
|
||||
"display": {
|
||||
"gui": {
|
||||
"rotation": [ 30, 315, 0 ],
|
||||
"translation": [ 2, 1, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
30,
|
||||
315,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
2,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"ground": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 3, -5 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"translation": [
|
||||
0,
|
||||
3,
|
||||
-5
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 180, 0 ],
|
||||
"translation": [ 0, 0, 4 ],
|
||||
"scale": [ 1.0, 1.0, 1.0 ]
|
||||
"rotation": [
|
||||
0,
|
||||
180,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
0,
|
||||
4
|
||||
]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 180, 0 ],
|
||||
"translation": [ 0, -1, 0 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
75,
|
||||
180,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
-1,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 180, 0 ],
|
||||
"translation": [ 0, 0, 2 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
0,
|
||||
180,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 180, 0 ],
|
||||
"translation": [ 0, 0, 2 ],
|
||||
"scale": [ 0.75, 0.75, 0.75 ]
|
||||
"rotation": [
|
||||
0,
|
||||
180,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
0,
|
||||
2
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user