Admiral_Damage

Untitled

Dec 25th, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1.     public static void registerRender(Block block) {
  2.         Item item = Item.getItemFromBlock(block);
  3.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0,
  4.                 new ModelResourceLocation(Ref.MOD_ID + ":" + item.getRegistryName().getResourcePath(), "inventory"));
  5.     }
  6.    
  7.     public static void registerStateMappings() {
  8.         addIgnoreStateForBlock(tungsten_fence_gate, new IProperty[] { BlockDoorFence.IN_WALL, BlockDoorFence.POWERED });
  9.         addIgnoreStateForBlock(structure_dummy, new IProperty[] { HORIZONTAL });
  10.         addIgnoreStateForBlock(tape, new IProperty[] {BlockConstructionTape.NORTH, BlockConstructionTape.SOUTH, BlockConstructionTape.WEST, BlockConstructionTape.EAST});
  11.     }
  12.    
  13.     public static void addIgnoreStateForBlock(Block block, IProperty[] properties) {
  14.         ModelLoader.setCustomStateMapper(block, (new StateMap.Builder()).ignore(properties).build());
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment