I hope you mean that i show this here ^^ Well i have searched on the classes over 4 Days and dont have found a error or something. Here now my Base, MainClass and my Network Classes.....
BlockBase
public class BlockBase extends Block {
protected String name;
public BlockBase(Material material, String name) {
super(material);
this.name = name;
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(FriedAdventure.creativeTab);
}
public void registerItemModel(Item item) {
FriedAdventure.proxy.registerItemRenderer(item, 0, name);
}
@Override
public BlockBase setCreativeTab(CreativeTabs tab) {
super.setCreativeTab(tab);
return this;
}
public Item createItemBlock() {
return new ItemBlock(this).setRegistryName(getRegistryName());
}
}
CommonProxy
public class CommonProxy {
public void registerItemRenderer(Item item, int meta, String id) {
}
public String localize(String unlocalized, Object... args) {
return I18n.translateToLocalFormatted(unlocalized, args);
}
public void registerRenderers() {
}
}
ClientProxy
public class ClientProxy extends CommonProxy {
@Override
public void registerItemRenderer(Item item, int meta, String id) {
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(FriedAdventure.modId + ":" + id, "inventory"));
}
@Override
public String localize(String unlocalized, Object... args) {
return I18n.format(unlocalized, args);
}
@Override
public void registerRenderers() {
}
}
MainClass
@Mod(modid = FriedAdventure.modId, name = FriedAdventure.name, version = FriedAdventure.version)
public class FriedAdventure {
public static final String modId = "friedadventure";
public static final String name = "FriedAdventure";
public static final String version = "1.0.0";
@Mod.Instance(modId)
public static FriedAdventure instance;
@SidedProxy(serverSide = "de.waldfried.friedadventure.proxy.CommonProxy", clientSide = "de.waldfried.friedadventure.proxy.ClientProxy")
public static CommonProxy proxy;
public static final FrieAdventTab creativeTab = new FrieAdventTab();
public static SimpleNetworkWrapper network;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
proxy.registerRenderers();
GameRegistry.registerWorldGenerator(new ModWorldGen(), 3);
}
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
ModRecipes.init();
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
}
@Mod.EventBusSubscriber
public static class RegsitrationHandler {
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
ModItems.register(event.getRegistry());
ModBlocks.registerItemBlocks(event.getRegistry());
}
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
ModBlocks.register(event.getRegistry());
}
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
ModItems.registerModels();
ModBlocks.registerModels();
}
}
}
When you mean to view by my self , then sorry ^^ Well, my code is not the cleanest Solution but i hope you can tell me a Solution.