Advertisement
Guest User

:)

a guest
Oct 16th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package com.ChestedYT.Mod.init;
  2.  
  3. import com.ChestedYT.Mod.objects.ItemCheese;
  4.  
  5. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  6. import net.minecraft.item.Item;
  7. import net.minecraftforge.client.model.ModelLoader;
  8. import net.minecraftforge.fml.common.registry.ForgeRegistries;
  9.  
  10. public class ItemInit {
  11.  
  12. public static Item cheese;
  13.  
  14. public static void init() {
  15. cheese = new ItemCheese();
  16. }
  17.  
  18. public static void register() {
  19. ForgeRegistries.ITEMS.register(cheese);
  20. }
  21.  
  22. public static void registerRenders() {
  23. registerRender(cheese);
  24. }
  25.  
  26. public static void registerRender(Item item) {
  27. ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement