Skip to content

Commit

Permalink
Update to latest Mantle build and reduce model data objects created
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Aug 6, 2020
1 parent 608b9dc commit d125256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ minecraft_version=1.16.1
minecraft_base_version=1.15
forge_version=32.0.75
mappings_version=20200723-1.16.1
mantle_version=1.6.17
mantle_version=1.6.20
jei_version=6.0.+
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class BookshelfTileEntity extends InventoryTileEntity implements IRetextu
*/
private float enchantBonus = Float.NaN;

private final IModelData data = new ModelDataMap.Builder().withProperty(BOOKS).withProperty(RetexturedHelper.BLOCK_PROPERTY).build();
public BookshelfTileEntity() {
super(InspirationsBuilding.tileBookshelf, TITLE, 14, 1);
}
Expand Down Expand Up @@ -151,12 +152,12 @@ public IModelData getModelData() {
}
}
// get texture if present
ModelDataMap.Builder data = new ModelDataMap.Builder().withInitial(BOOKS, books);
data.setData(BOOKS, books);
Block texture = getTexture();
if (texture != Blocks.AIR) {
data = data.withInitial(RetexturedHelper.BLOCK_PROPERTY, texture);
data.setData(RetexturedHelper.BLOCK_PROPERTY, texture);
}
return data.build();
return data;
}


Expand Down

0 comments on commit d125256

Please sign in to comment.