diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoader.java b/src/main/java/net/minecraftforge/client/model/ModelLoader.java index 72b860f3c..3f51eae00 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoader.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoader.java @@ -369,7 +369,7 @@ public class ModelLoader extends ModelBakery Variant v = variants.get(i); builder.add(model.bake(addUV(v.isUvLocked(), state.apply(model)), format, bakedTextureGetter), variants.get(i).getWeight()); } - return new IFlexibleBakedModel.Wrapper(builder.build(), Attributes.DEFAULT_BAKED_FORMAT); + return new FlexibleWeightedBakedModel(builder.build(), Attributes.DEFAULT_BAKED_FORMAT); } public IModelState getDefaultState() @@ -378,6 +378,24 @@ public class ModelLoader extends ModelBakery } } + private static class FlexibleWeightedBakedModel extends WeightedBakedModel implements IFlexibleBakedModel + { + private final WeightedBakedModel parent; + private final VertexFormat format; + + public FlexibleWeightedBakedModel(WeightedBakedModel parent, VertexFormat format) + { + super(parent.models); + this.parent = parent; + this.format = format; + } + + public VertexFormat getFormat() + { + return format; + } + } + private boolean isBuiltinModel(ModelBlock model) { return model == MODEL_GENERATED || model == MODEL_COMPASS || model == MODEL_CLOCK || model == MODEL_ENTITY; diff --git a/src/main/resources/forge_at.cfg b/src/main/resources/forge_at.cfg index a1b87c4f6..1bfa67952 100644 --- a/src/main/resources/forge_at.cfg +++ b/src/main/resources/forge_at.cfg @@ -148,3 +148,4 @@ protected net.minecraft.client.resources.model.ModelBakery func_177581_b(Lnet/mi protected net.minecraft.client.resources.model.ModelBakery func_177587_c(Lnet/minecraft/client/renderer/block/model/ModelBlock;)Z # isCustomRenderer protected net.minecraft.client.resources.model.ModelBakery func_177582_d(Lnet/minecraft/client/renderer/block/model/ModelBlock;)Lnet/minecraft/client/renderer/block/model/ModelBlock; # makeItemModel protected net.minecraft.client.resources.model.ModelBakery func_177580_d(Lnet/minecraft/util/ResourceLocation;)Lnet/minecraft/util/ResourceLocation; # getModelLocation +public net.minecraft.client.resources.model.WeightedBakedModel field_177565_b # models