|
16 | 16 | import net.minecraft.block.state.IBlockState; |
17 | 17 | import net.minecraft.client.Minecraft; |
18 | 18 | import net.minecraft.client.renderer.block.model.ModelResourceLocation; |
19 | | -import net.minecraft.client.renderer.block.statemap.IStateMapper; |
20 | 19 | import net.minecraft.item.Item; |
21 | 20 | import net.minecraft.util.BlockRenderLayer; |
22 | 21 | import net.minecraft.util.IStringSerializable; |
|
40 | 39 | public class VariantActiveBlock<T extends Enum<T> & IStringSerializable> extends VariantBlock<T> implements IModelSupplier { |
41 | 40 |
|
42 | 41 | public static final ModelResourceLocation MODEL_LOCATION = new ModelResourceLocation(new ResourceLocation(GTValues.MODID, "active_blocks"), "inventory"); |
43 | | - public static final IStateMapper mapper = new SimpleStateMapper(MODEL_LOCATION); |
44 | 42 | public static final Object2ObjectOpenHashMap<Integer, ObjectSet<BlockPos>> ACTIVE_BLOCKS = new Object2ObjectOpenHashMap<>(); |
45 | 43 | public static final PropertyBool ACTIVE_DEPRECATED = PropertyBool.create("active"); |
46 | 44 | public static final UnlistedBooleanProperty ACTIVE = new UnlistedBooleanProperty("active"); |
@@ -120,7 +118,7 @@ public void onTextureStitch(TextureStitchEvent.Pre event) { |
120 | 118 | @Override |
121 | 119 | @SideOnly(Side.CLIENT) |
122 | 120 | public void onModelRegister() { |
123 | | - ModelLoader.setCustomStateMapper(this, mapper); |
| 121 | + ModelLoader.setCustomStateMapper(this, new SimpleStateMapper(MODEL_LOCATION)); |
124 | 122 | for (IBlockState state : this.getBlockState().getValidStates()) { |
125 | 123 | //ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), this.getMetaFromState(state), new ModelResourceLocation(this.getRegistryName(), "active=true," + statePropertiesToString(state.getProperties()))); |
126 | 124 | //ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), this.getMetaFromState(state), new ModelResourceLocation(this.getRegistryName(), "active=false," + statePropertiesToString(state.getProperties()))); |
|
0 commit comments