Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • 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!!

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.

CRY I SUCK AT THIS. I STARTED LEARNING JAVA 2 WEEKS AGO.

Modding is not for you.

Maker of the Craft++ mod.

  • 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!!

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.

  • 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!!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.