Changed generic signature of GameRegistry.register methods to work around the type inference bug; updated all example mods to the new block/item registration method.

This commit is contained in:
RainWarrior committed 2016-04-03 10:14:16 +03:00
1 parent fc57d5e6c6
commit 77772ac3f5
12 files changed
+99 -44

No files matched your search

@@ -3,6 +3,7 @@ package net.minecraftforge.debug;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@@ -26,7 +27,7 @@ public class ItemLayerModelDebug
{
public void preInit(FMLPreInitializationEvent event)
{
GameRegistry.registerItem(TestItem.instance, TestItem.name);
GameRegistry.register(TestItem.instance);
}
}
@@ -52,6 +53,7 @@ public class ItemLayerModelDebug
{
setCreativeTab(CreativeTabs.tabBlock);
setUnlocalizedName(MODID + ":" + name);
setRegistryName(new ResourceLocation(MODID, name));
}
}
}