Skip to content

Commit

Permalink
enables customizable bucket models to fluid builder (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietro-lopes authored May 20, 2024
1 parent b6c1a0d commit 73dea2b
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ public BucketItem createObject() {

@Override
public void generateAssetJsons(AssetJsonGenerator generator) {
generator.itemModel(id, m -> m.parent("kubejs:item/generated_bucket"));
if (modelJson != null) {
generator.json(AssetJsonGenerator.asItemModelLocation(id), modelJson);
return;
}

generator.itemModel(id, m -> {
if (!parentModel.isEmpty()) {
m.parent(parentModel);
} else {
m.parent("kubejs:item/generated_bucket");
}

if (textureJson.size() > 0) {
m.textures(textureJson);
}
});
}
}

0 comments on commit 73dea2b

Please sign in to comment.