diff --git a/src/main/java/vazkii/botania/client/core/handler/MiscellaneousIcons.java b/src/main/java/vazkii/botania/client/core/handler/MiscellaneousIcons.java index d3d6eff2f..674ee39b7 100644 --- a/src/main/java/vazkii/botania/client/core/handler/MiscellaneousIcons.java +++ b/src/main/java/vazkii/botania/client/core/handler/MiscellaneousIcons.java @@ -87,6 +87,9 @@ public class MiscellaneousIcons { @SubscribeEvent public void onModelBake(ModelBakeEvent evt) { + + System.out.println(evt.getModelRegistry().getObject(new ModelResourceLocation("botania:daybloom", "normal"))); + // Floating flowers evt.getModelRegistry().putObject(new ModelResourceLocation("botania:miniIsland", "normal"), FloatingFlowerModel.INSTANCE); evt.getModelRegistry().putObject(new ModelResourceLocation("botania:miniIsland", "inventory"), FloatingFlowerModel.INSTANCE); diff --git a/src/main/java/vazkii/botania/client/model/SpecialFlowerModel.java b/src/main/java/vazkii/botania/client/model/SpecialFlowerModel.java index e8ea291a9..c5374bf39 100644 --- a/src/main/java/vazkii/botania/client/model/SpecialFlowerModel.java +++ b/src/main/java/vazkii/botania/client/model/SpecialFlowerModel.java @@ -85,7 +85,7 @@ public class SpecialFlowerModel implements IModelCustomData { @Override public IBakedModel bake(IModelState state, VertexFormat format, Function bakedTextureGetter) { // "Bake" the SpecialFlowerModel (in reality, just create another wrapper for all the delegate blockModels) - return new SpecialFlowerBakedModel(blockModels, itemModels, format, IPerspectiveAwareModel.MapWrapper.getTransforms(state)); + return new SpecialFlowerBakedModel(blockModels, itemModels, IPerspectiveAwareModel.MapWrapper.getTransforms(state)); } @Override @@ -154,24 +154,20 @@ public class SpecialFlowerModel implements IModelCustomData { private final ImmutableMap transforms; private final ImmutableMap, ModelResourceLocation> blockModels; private final ImmutableMap, ModelResourceLocation> itemModels; - private final VertexFormat vertexFormat; private IBakedModel baseModel; private ImmutableMap bakedBlockModels; private ImmutableMap bakedItemModels; - private ImmutableMap, ImmutableList> quads; public SpecialFlowerBakedModel(ImmutableMap, ModelResourceLocation> blockModels, - ImmutableMap, ModelResourceLocation> itemModels, - VertexFormat format, ImmutableMap cameraTransforms) { + ImmutableMap, ModelResourceLocation> itemModels, ImmutableMap cameraTransforms) { this.blockModels = blockModels; this.itemModels = itemModels; - this.vertexFormat = format; this.transforms = cameraTransforms; } private void refreshBakedModels() { - if(baseModel == null) { + //if(baseModel == null) { // If not done already, steal all the real baked models and cache them ModelManager manager = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelManager(); baseModel = getBlockModel(manager, Optional.absent()); @@ -193,14 +189,7 @@ public class SpecialFlowerModel implements IModelCustomData { } bakedItemModels = builder2.build(); - - ImmutableMap.Builder, ImmutableList> quadBuilder = ImmutableMap.builder(); - quadBuilder.put(Optional.absent(), buildQuads(Optional.absent())); - for(EnumFacing side : EnumFacing.values()) { - quadBuilder.put(Optional.of(side), buildQuads(Optional.of(side))); - } - quads = quadBuilder.build(); - } + //} } private IBakedModel getBlockModel(ModelManager manager, Optional opt) { @@ -219,20 +208,6 @@ public class SpecialFlowerModel implements IModelCustomData { return manager.getModel(loc); } - private ImmutableList buildQuads(Optional side) { - ImmutableList.Builder builder = ImmutableList.builder(); - - for(IBakedModel model : bakedBlockModels.values()) { - builder.addAll(model.getQuads(null, side.orNull(), 0)); - } - - for(IBakedModel model : bakedItemModels.values()) { - builder.addAll(model.getQuads(null, side.orNull(), 0)); - } - - return builder.build(); - } - @Override public List getQuads(IBlockState state, EnumFacing face, long rand) { if(state.getBlock() != ModBlocks.specialFlower)