Created
March 18, 2016 16:55
-
-
Save anonymous/41b4bf082f2d980e7f74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hubbard.trueminecraftmachines.init; | |
import hubbard.trueminecraftmachines.blocks.Machines.blockGrinder; | |
import hubbard.trueminecraftmachines.main.Reference; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.resources.model.ModelResourceLocation; | |
import net.minecraft.item.Item; | |
import net.minecraftforge.fml.common.registry.GameRegistry; | |
public class Block_List | |
{ | |
public static Block grinder; | |
public static void init() | |
{ | |
grinder = new blockGrinder().setUnlocalizedName("grinder"); | |
} | |
public static void register() | |
{ | |
GameRegistry.registerBlock(grinder, grinder.getUnlocalizedName().substring(5)); | |
} | |
public static void registerRenders() | |
{ | |
registerRender(grinder); | |
} | |
public static void registerRender(Block block) | |
{ | |
Item item = Item.getItemFromBlock(block); | |
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment