mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
switch water bowl to json system
This commit is contained in:
1 parent
41fabac3c9
commit
fb8808168a
2 files changed
+33
-13
No files matched your search
@@ -107,12 +107,6 @@ public class MiscellaneousIcons {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onModelBake(ModelBakeEvent evt) {
|
||||
// Water bowl
|
||||
ModelDynBucket bowl = new ModelDynBucket(prefix("items/waterbowl_base"), prefix("items/waterbowl_fluid"), prefix("items/waterbowl_cover"), Fluids.WATER, false, true);
|
||||
IModelState transform = ForgeBlockStateV1.Transforms.get("forge:default-item").get();
|
||||
IBakedModel bakedBowl = bowl.bake(evt.getModelLoader(), ModelLoader.defaultTextureGetter(), new BasicState(transform, false), DefaultVertexFormats.ITEM);
|
||||
evt.getModelRegistry().put(new ModelResourceLocation(ModItems.waterBowl.getRegistryName(), "inventory"), bakedBowl);
|
||||
|
||||
// Floating flower item models
|
||||
for (Map.Entry<ResourceLocation, IBakedModel> e : evt.getModelRegistry().entrySet()) {
|
||||
if (e.getValue() instanceof FloatingFlowerModel.Baked) {
|
||||
@@ -253,7 +247,7 @@ public class MiscellaneousIcons {
|
||||
}
|
||||
|
||||
private TextureAtlasSprite get(AtlasTexture map, String name) {
|
||||
return map.getSprite(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
return map.getSprite(prefix(name));
|
||||
}
|
||||
|
||||
private MiscellaneousIcons() {}
|
||||
|
||||
@@ -1,10 +1,36 @@
|
||||
{
|
||||
"__comment0": "Temporary 1.14 dummy, forces the textures to be loaded and stitched so we can construct",
|
||||
"__comment1": "the ModelDynBucket in code. Should be migrated to the new model json system soon (tm).",
|
||||
"parent": "minecraft:item/generated",
|
||||
"loader": "forge:bucket",
|
||||
"fluid": "water",
|
||||
"applyTint": true,
|
||||
"textures": {
|
||||
"layer0": "botania:items/waterbowl_base",
|
||||
"layer1": "botania:items/waterbowl_fluid",
|
||||
"layer2": "botania:items/waterbowl_cover"
|
||||
"base": "botania:items/waterbowl_base",
|
||||
"fluid": "botania:items/waterbowl_fluid",
|
||||
"cover": "botania:items/waterbowl_cover"
|
||||
},
|
||||
"display": {
|
||||
"ground": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 2, 0],
|
||||
"scale":[ 0.5, 0.5, 0.5 ]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [ 0, 180, 0 ],
|
||||
"translation": [ 0, 13, 7],
|
||||
"scale":[ 1, 1, 1]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 3, 1 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, -90, 25 ],
|
||||
"translation": [ 1.13, 3.2, 1.13],
|
||||
"scale": [ 0.68, 0.68, 0.68 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 180, 0 ],
|
||||
"scale": [ 1, 1, 1 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user