April 20, 201510 yr http://img-9gag-lol.9cache.com/photo/a9MYVrj_460sa_v1.gif[/img] RenderingRegistry.registerEntityRenderingHandler(EntityGreekFire.class, new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), ModItems.GreekFire, Minecraft.getMinecraft().getRenderItem()); 1.7.10 is no longer supported by forge, you are on your own.
April 20, 201510 yr Author Like This? Main Registry package com.OlympiansMod.Main; import net.minecraft.client.renderer.entity.RenderSnowball; import com.OlympiansMod.Block.ModBlocks; import com.OlympiansMod.Item.ModItems; import com.OlympiansMod.creativetabs.MCreativeTabs; import com.OlympiansMod.entity.EntityGreekFire; import com.OlympiansMod.entity.MEntity; import com.OlympiansMod.lib.Refstrings; import com.OlympiansMod.world.MWorld; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = Refstrings.MODID , name = Refstrings.NAME , version = Refstrings.VERSION) public class MainRegistry { @SidedProxy(clientSide = Refstrings.CLIENTSIDE , serverSide = Refstrings.SERVERSIDE) public static ServerProxy proxy; @Instance public static MainRegistry modInstance; @EventHandler public static void PreLoad(FMLPreInitializationEvent PreEvent) { MCreativeTabs.initialiseTabs(); ModBlocks.MainRegistry(); MEntity.MainRegistry(); ModItems.MainRegistry(); MWorld.MainRegistry(); CraftingManager.mainRegistry(); } @EventHandler public static void Load(FMLInitializationEvent event) { proxy.registerRenderInfo(); } @EventHandler public static void PostLoad(FMLPostInitializationEvent PostEvent) { } } SnowBall package com.OlympiansMod.Main; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderSnowball; import com.OlympiansMod.Item.ModItems; import com.OlympiansMod.entity.EntityGreekFire; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends ServerProxy{ public void registerRenderInfo(){ new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), ModItems.GreekFire, Minecraft.getMinecraft().getRenderItem()); } public int addArmor(String armor){ return RenderingRegistry.addNewArmourRendererPrefix(armor); } } getRenderManager isn't working aswell as getRenderItem. how do I fix it? CRY I SUCK AT THIS. I STARTED LEARNING JAVA 2 WEEKS AGO. Im serious don't look at it!!
April 20, 201510 yr Read my last post AGAIN, I literally gave you working code 3 times. Hover over red code and import your shit. Other way is to use key-combo (in Eclipse): ctrl+shift+o 1.7.10 is no longer supported by forge, you are on your own.
April 20, 201510 yr CRY I SUCK AT THIS. I STARTED LEARNING JAVA 2 WEEKS AGO. Modding is not for you. Maker of the Craft++ mod.
April 20, 201510 yr Author I WOULDNT LET ME IMPORT SINCE YOU FIRST GAVE ME THE CODE! IT WANTS ME TO Add CAST TO METHOD RECIEIVER! GOD TAKE ME NOW! Im serious don't look at it!!
April 20, 201510 yr Author actually, the error says this The method getRenderManager() is undefined for the type Minecraft. what do I define it as? second one is The method getRenderItem() is undefined for the type Minecraft. same error, you say I don't need to define it, if so were and how do I define it, and if you wont tell me, please give me a decent tutorial. Im serious don't look at it!!
April 20, 201510 yr Ok, be nice to the kid. Ernio's code is actually wrong. I've kind of only been skimming it, but given that Eclipse wouldn't import things and resolve the errors, I thought I'd take a look. getRenderItem() and getRenderManager() are both undefined for class Minecraft in 1.7.10 And RenderSnowball doesn't want either one in its constructor: RenderSnowball(Item p_i1259_1_, int p_i1259_2_){...} Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
April 20, 201510 yr Author My original code worked out just fine until ernie said it was wrong, plus It does take time to figure out how the functions work with minecraft and what not. anyway I'm going to make a new thread about this specifically. Im serious don't look at it!!
April 20, 201510 yr Ernio's code is correct for 1.8, and when I saw it, I completely forgot the thread was marked 1.7.10 @OP You don't need to make a new thread. Use the code Draco showed you, but before you do that, follow diesieben's advice and LEARN JAVA. http://i.imgur.com/NdrFdld.png[/img]
April 20, 201510 yr Note: I have not registered a snowball item in 1.7, only 1.6, but the code looks very similar and I was able to look up the function just fine. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.