Jump to content

[1.7.10] Explosion needs to created in the server PLS HELP


Recommended Posts

I have a Throwable entity that causes an explosion, what do I need to fix, the explosion doesn't register on the server side, so when ever I get near the explosions destruction, my game glitches as if the blocks are really there.

 

EntityClasses

package com.OlympiansMod.entity;

import net.minecraft.entity.EntityList;

import com.OlympiansMod.Main.MainRegistry;

import cpw.mods.fml.common.registry.EntityRegistry;

public class MEntity {
public static void MainRegistry(){

}
public static void registerEntity(){
	createEntity(EntityGreekFire.class, "GreekFire", 0x008521, 0x00FF0800);
}
public static void createEntity(Class entityClass, String entityName, int solidColour, int spotColour){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerModEntity(entityClass, entityName, randomId, MainRegistry.modInstance, 80, 1, true);
	createEgg(randomId, solidColour, spotColour);
}
private static void createEgg(int randomId, int solidColour, int spotColour){
	EntityList.entityEggs.put(Integer.valueOf(randomId), new EntityList.EntityEggInfo(randomId, solidColour, spotColour));

}
}

 

package com.OlympiansMod.entity;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class EntityGreekFire extends EntityThrowable{

public EntityGreekFire(World p_i1776_1_) {
	super(p_i1776_1_);
}
public EntityGreekFire(World world, EntityLivingBase entity){
	super(world, entity);
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
	for(int i = 0; i < 10; i++){
		this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0f, 0f, 0f);
		this.worldObj.playSound(this.posX, this.posY, this.posZ, "random.explode", 10.0f, 1.0f, inGround);
	}

	if(this.worldObj.isRemote){
		this.setDead();
		this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 10f, true);
		}
	}

}


 

Why is the game not registering it??

Im serious don't look at it!!

Link to comment
Share on other sites

wow, sorry.

package com.OlympiansMod.Item;

import com.OlympiansMod.entity.EntityGreekFire;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class GreekFire extends Item{
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){
	if(!player.capabilities.isCreativeMode){
		--itemstack.stackSize;
	}
	world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f);

	if(world.isRemote){
		world.spawnEntityInWorld(new  EntityGreekFire(world, player));
	}
	return itemstack;
}

}

Im serious don't look at it!!

Link to comment
Share on other sites

crud now the the entity wont register.

 

package com.OlympiansMod.Main;

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(){
	RenderingRegistry.registerEntityRenderingHandler(EntityGreekFire.class, new RenderSnowball(ModItems.GreekFire));

}
public int addArmor(String armor){
	return RenderingRegistry.addNewArmourRendererPrefix(armor);

}

}

Im serious don't look at it!!

Link to comment
Share on other sites

Could you learn Java? ...

RenderSnowball(RenderManager p_i46137_1_, Item p_i46137_2_, RenderItem p_i46137_3_)

new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), YourItem, Minecraft.getMinecraft().getRenderItem())

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

RenderingRegistry.registerEntityRenderingHandler(EntityGreekFire.class, new RenderSnowball(((Object) Minecraft.getMinecraft()).getRenderManager(), ModItems.GreekFire, ((Object) Minecraft.getMinecraft()).getRenderItem()));

 

errors on both your functions

You cannot cast Minecraft to Object and then expect to be able to call a Minecraft class method (e.g. getRenderItem). Please learn Java before posting anything further.

Link to comment
Share on other sites

I gave you code.

 

new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), YourItem, Minecraft.getMinecraft().getRenderItem())

 

Why did you changed it?

 

On this forum - always post your error log. What is the problem now?

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

I didn't get and error when I started up the minecraft. all I know is that when I Fixed

if(world.isRemote){
		world.spawnEntityInWorld(new  EntityGreekFire(world, player));

to

if(!world.isRemote){
		world.spawnEntityInWorld(new  EntityGreekFire(world, player));

The entity no longer renders, I think the ! overrides its ability to render the entity or something.

but without it the entity doesn't function properly. when I tried your code, eclipse gave me an option to put the object thing. the code had errors when I pasted it. I don't know exactly why.

 

Im serious don't look at it!!

Link to comment
Share on other sites

The code did not have errors - the errors were caused by you not importing the necessary class references. I'm not trying to put you down or anything, but had you more knowledge of Java or coding in general, you would have understood that immediately. The folks here help you out for free in their spare time, so the least you could do to reciprocate is to spend some of your time learning the basics so you don't waste their time.

 

Re: your entity no longer rendering: the client side (when the world is remote) is responsible for rendering entities, and the server (when the world is NOT remote) informs the client when a new entity spawns. If you spawn an entity directly on the client, it will basically be a 'ghost' that cannot be interacted with and has no AI or anything, so you should always spawn only on the server.

 

You must be missing something critical in your code, such as EntityRegistry.registerModEntity(args for your entity class). You should search for a basic entity tutorial.

Link to comment
Share on other sites

im not missing that line of code

EntityRegistry.registerModEntity(entityClass, entityName, randomId, MainRegistry.modInstance, 80, 1, true);

Just because you are not missing that one specific thing does not negate my statement: something in your code is wrong, and unless you post your code (not just little snippets of it), we cannot help you.

 

Please use a service such as pastebin and post each of your classes separately, or better, if you have a Git repository, provide a link to that.

Link to comment
Share on other sites

k

MainRegistry

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();
        proxy.registerRenderInfo();      

}
@EventHandler
public static void Load(FMLInitializationEvent event) {

}
@EventHandler
public static void PostLoad(FMLPostInitializationEvent PostEvent) {

}

}

ClientProxy

package com.OlympiansMod.Main;

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 ServerProxy {
public void registerRenderInfo() {
	RenderingRegistry.registerEntityRenderingHandler(EntityGreekFire.class, new RenderSnowball(ModItems.GreekFire));


}
public int addArmor(String armor){
	return 0;

}

}

EntityRegister

package com.OlympiansMod.entity;

import net.minecraft.entity.EntityList;

import com.OlympiansMod.Main.MainRegistry;

import cpw.mods.fml.common.registry.EntityRegistry;

public class MEntity {
public static void MainRegistry(){

}
public static void registerEntity(){
	createEntity(EntityGreekFire.class, "GreekFire", 0x008521, 0x00FF0800);
}
public static void createEntity(Class entityClass, String entityName, int solidColour, int spotColour){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();

	EntityRegistry.registerModEntity(entityClass, entityName, randomId, MainRegistry.modInstance, 80, 1, false);
	createEgg(randomId, solidColour, spotColour);
}
private static void createEgg(int randomId, int solidColour, int spotColour){
	EntityList.entityEggs.put(Integer.valueOf(randomId), new EntityList.EntityEggInfo(randomId, solidColour, spotColour));

}
}

EntityGreekFireClass

package com.OlympiansMod.entity;

import com.OlympiansMod.Item.ModItems;

import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class EntityGreekFire extends EntityThrowable{

public EntityGreekFire(World p_i1776_1_) {
	super(p_i1776_1_);
}
public EntityGreekFire(World world, EntityLivingBase entity){
	super(world, entity);
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
	for(int i = 0; i < 10; i++){
		this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0f, 0f, 0f);
		this.worldObj.playSound(this.posX, this.posY, this.posZ, "random.explode", 10.0f, 1.0f, inGround);


	}

	if(!this.worldObj.isRemote){
		this.setDead();
		this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 15.0f, true);
		}
	}
}	



On Item Right Click Function

package com.OlympiansMod.Item;

import com.OlympiansMod.entity.EntityGreekFire;

import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class GreekFire extends Item{
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){
	if(!player.capabilities.isCreativeMode){
		--itemstack.stackSize;
	}
	world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f);

	if(!world.isRemote){
		world.spawnEntityInWorld(new  EntityGreekFire(world, player));
	}
	return itemstack;
}

}

Items Class

package com.OlympiansMod.Item;

import com.OlympiansMod.Block.ModBlocks;
import com.OlympiansMod.Main.MainRegistry;
import com.OlympiansMod.creativetabs.MCreativeTabs;
import com.OlympiansMod.lib.Refstrings;
import com.mojang.realmsclient.client.Request.Delete;

import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemSeeds;
import net.minecraft.world.SpawnerAnimals;
import net.minecraftforge.common.util.EnumHelper;

public class ModItems {

public static void MainRegistry() {
	initializeItem();
	registerItem();
}
//Armor Material
public static ArmorMaterial GArmor = EnumHelper.addArmorMaterial("GArmor", 33, new int[]{4, 10, 7, 2}, 10);
public static ArmorMaterial CBArmor = EnumHelper.addArmorMaterial("Celestial Bronze Armor", 33, new int[]{2, 8, 6, 3}, 10);
  

//Tool Material
public static ToolMaterial FrankMagic = EnumHelper.addToolMaterial("Frank Magic", 3, 3, 9.0f, 6, 10);
public static ToolMaterial Hack = EnumHelper.addToolMaterial("Hack", 3, 1000, 9.0f, 96, 10);
public static ToolMaterial CBronze = EnumHelper.addToolMaterial("Celestial Bronze", 3, 2500, 10.0f, 6, 10);
public static ToolMaterial IGold = EnumHelper.addToolMaterial("Imperial Gold", 3, 2250, 9.0f, 5, 10);
public static ToolMaterial SIron = EnumHelper.addToolMaterial("Stygian Iron", 3, 5000, 11.50f, 7, 10);
//Tools-Items                                                         "name"     3 = harvestlevel 2500 = uses 5 = damage  
public static Item CelestialBronzeIngot;
public static Item BallPointPen;
public static Item IGoldIngot;
public static Item SIronIngot;
public static Item anklamolses;
public static Item Riptide;
public static Item CBronzePick;
public static Item CBronzeHoe;
public static Item CBronzeSpade;
public static Item CBronzeSword;
public static Item CBronzeAxe;
public static Item FSpear;
public static Item FireEssence;
public static Item IceShard;
public static Item LightningEssence;
public static Item IGoldPick;
public static Item IGoldAxe;
public static Item IGoldSpade;
public static Item IGoldHoe;
public static Item IGoldSword;
public static Item SIronPick;
public static Item SIronAxe;
public static Item SIronSpade;
public static Item SIronHoe;
public static Item SIronSword;
public static Item PoplarWoodStick;
public static Item CBNugget;
public static Item SINugget;
public static Item IGNugget;

//Food-Crops
public static Item SSeeds;
public static Item CBronzeItem;
public static Item Ambrosia;

//Armor
public static Item CBHelm;
public static Item CBChest;
public static Item CBLegg;
public static Item CBBoot;
public static Item GWarHelm;
public static Item GWarChest;
public static Item GWarLegg;
public static Item GWarBoots;

//Item Entitys
public static Item GreekFire;




public static void initializeItem() {
	//DiffrentWayToMakeTools: youritem = new youritem(ID, youritemmaterial).setIconIndex(.setItemName("your item");
	//DiffrentWayToRegisterName: LanguageRegistry.addName(youritem,(youritem);
	//DiffrentWayToMakeItems: youritem = new youritem(ID).setIconIndex(ID).setItemName("your item");
	CelestialBronzeIngot = new Item().setUnlocalizedName("CelestialBronzeIngot").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":CelestialBronzeIngot");
	BallPointPen = new Item().setUnlocalizedName("BallPointPen").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":BallPointPen");
	IGoldIngot = new Item().setUnlocalizedName("IGoldIngot").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":IGoldIngot");
	SIronIngot = new Item().setUnlocalizedName("SIronIngot").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":SIronIngot");
	anklamolses = new Item().setUnlocalizedName("anklamolses").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":anklamolses");
	Riptide = new Riptide(Hack).setUnlocalizedName("Riptide").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":Riptide").setMaxDamage(20).setMaxStackSize(1);
	CBronzePick = new CBronzePick(CBronze).setUnlocalizedName("CBronzePick").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBronzePick");
        CBronzeAxe = new CBronzeAxe(CBronze).setUnlocalizedName("CBronzeAxe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBronzeAxe");
        CBronzeHoe = new CBronzeHoe(CBronze).setUnlocalizedName("CBronzeHoe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBronzeHoe");
	CBronzeSword = new CBronzeSword(CBronze).setUnlocalizedName("CBronzeSword").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBronzeSword");
	CBronzeSpade = new CBronzeSpade(CBronze).setUnlocalizedName("CBronzeSpade").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBronzeSpade");
	FSpear = new FSpear(FrankMagic).setUnlocalizedName("FSpear").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID +":Franks Spear").setNoRepair();
	FireEssence = new Item().setUnlocalizedName("FireEssence").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":FireEssence");
	IceShard = new Item().setUnlocalizedName("IceShard").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":IceShard");
	LightningEssence = new Item().setUnlocalizedName("LightningEssence").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":LightningEssence");
	IGoldPick = new IGoldPick(IGold).setUnlocalizedName("IGoldPick").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":IGoldPick");
	IGoldAxe = new IGoldAxe(IGold).setUnlocalizedName("IGoldAxe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":IGoldAxe");
	IGoldHoe = new IGoldHoe(IGold).setUnlocalizedName("IGoldHoe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":IGoldHoe");
	IGoldSpade = new IGoldSpade(IGold).setUnlocalizedName("IGoldSpade").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":IGoldSpade");
	IGoldSword = new IGoldSword(IGold).setUnlocalizedName("IGoldSword").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":IGoldSword");
	SIronPick = new SIronPick(SIron).setUnlocalizedName("SIronPick").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":SIronPick");
	SIronAxe = new SIronAxe(SIron).setUnlocalizedName("SIronAxe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":SIronAxe");
	SIronHoe = new SIronHoe(SIron).setUnlocalizedName("SIronHoe").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":SIronHoe");
	SIronSpade = new SIronSpade(SIron).setUnlocalizedName("SIronSpade").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":SIronSpade");
	SIronSword = new SIronSword(SIron).setUnlocalizedName("SIronSword").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":SIronSword");
	CBNugget = new Item().setUnlocalizedName("CBNugget").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":CelestialBronzeNugget");
	PoplarWoodStick = new Item().setUnlocalizedName("PoplarWoodStick").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":PoplarWoodStick");
	IGNugget = new Item().setUnlocalizedName("IGNugget").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":IGoldNugget");
	SINugget = new Item().setUnlocalizedName("SINugget").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":SIronNugget");
	//Plants/Crops/Foods
	SSeeds = new ItemSeeds(ModBlocks.SPlant, Blocks.farmland).setCreativeTab(MCreativeTabs.tabItems).setUnlocalizedName("SSeeds").setTextureName(Refstrings.MODID + ":SSeeds");
	CBronzeItem = new ItemFood(4, 1F, true).setCreativeTab(MCreativeTabs.tabItems).setUnlocalizedName("CBronzeItem").setTextureName(Refstrings.MODID + ":Strawberry");
	Ambrosia = new ItemFood(20, 5F, false).setCreativeTab(MCreativeTabs.tabItems).setUnlocalizedName("Ambrosia").setTextureName(Refstrings.MODID + ":Ambrosia");
	//Armor
	CBHelm = new CBArmor(CBArmor, MainRegistry.proxy.addArmor("CBArmor"), 0).setUnlocalizedName("CBHelm").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBHelm");
	CBChest = new CBArmor(CBArmor, MainRegistry.proxy.addArmor("CBArmor"), 1).setUnlocalizedName("CBChest").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBChest");
	CBLegg = new CBArmor(CBArmor, MainRegistry.proxy.addArmor("CBArmor"), 2).setUnlocalizedName("CBLegg").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBLegg");
	CBBoot = new CBArmor(CBArmor, MainRegistry.proxy.addArmor("CBArmor"), 3).setUnlocalizedName("CBBoot").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":CBBoot");
	GWarHelm = new GArmor(GArmor, MainRegistry.proxy.addArmor("GArmor"), 0).setUnlocalizedName("GreekWarHelm").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":GreekWarHelmet");
	GWarChest = new GArmor(GArmor, MainRegistry.proxy.addArmor("GArmor"), 1).setUnlocalizedName("GreekWarChest").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":GreekWarChestplate");
	GWarLegg = new GArmor(GArmor, MainRegistry.proxy.addArmor("GArmor"), 2).setUnlocalizedName("GreekWarLegg").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":GreekWarLeggings");
	GWarBoots = new GArmor(GArmor, MainRegistry.proxy.addArmor("GArmor"), 3).setUnlocalizedName("GreekWarBoot").setCreativeTab(MCreativeTabs.tabTools).setTextureName(Refstrings.MODID + ":GreekWarBoots");
	//Item Entitys
	GreekFire = new GreekFire().setUnlocalizedName("GreekFire").setCreativeTab(MCreativeTabs.tabItems).setTextureName(Refstrings.MODID + ":GreekFire");

}

public static void registerItem() {
	GameRegistry.registerItem(CelestialBronzeIngot, CelestialBronzeIngot.getUnlocalizedName());
	GameRegistry.registerItem(BallPointPen, BallPointPen.getUnlocalizedName());
	GameRegistry.registerItem(IGoldIngot, IGoldIngot.getUnlocalizedName());
	GameRegistry.registerItem(SIronIngot, SIronIngot.getUnlocalizedName());
	GameRegistry.registerItem(anklamolses, anklamolses.getUnlocalizedName());
	GameRegistry.registerItem(CBronzePick, CBronzePick.getUnlocalizedName());
	GameRegistry.registerItem(CBronzeAxe, CBronzeAxe.getUnlocalizedName());
	GameRegistry.registerItem(CBronzeHoe, CBronzeHoe.getUnlocalizedName());
	GameRegistry.registerItem(CBronzeSword, CBronzeSword.getUnlocalizedName());
	GameRegistry.registerItem(CBronzeSpade, CBronzeSpade.getUnlocalizedName());
	GameRegistry.registerItem(IGoldPick, IGoldPick.getUnlocalizedName());
	GameRegistry.registerItem(IGoldAxe, IGoldAxe.getUnlocalizedName());
	GameRegistry.registerItem(IGoldHoe, IGoldHoe.getUnlocalizedName());
	GameRegistry.registerItem(IGoldSpade, IGoldSpade.getUnlocalizedName());
	GameRegistry.registerItem(IGoldSword, IGoldSword.getUnlocalizedName());
	GameRegistry.registerItem(SIronPick, SIronPick.getUnlocalizedName());
	GameRegistry.registerItem(SIronHoe, SIronHoe.getUnlocalizedName());
	GameRegistry.registerItem(SIronSpade, SIronSpade.getUnlocalizedName());
	GameRegistry.registerItem(SIronAxe, SIronAxe.getUnlocalizedName());
	GameRegistry.registerItem(SIronSword, SIronSword.getUnlocalizedName());
	GameRegistry.registerItem(Riptide, Riptide.getUnlocalizedName());
	GameRegistry.registerItem(FSpear, FSpear.getUnlocalizedName());
	GameRegistry.registerItem(LightningEssence, LightningEssence.getUnlocalizedName());
	GameRegistry.registerItem(FireEssence, FireEssence.getUnlocalizedName());
	GameRegistry.registerItem(IceShard, IceShard.getUnlocalizedName());
	GameRegistry.registerItem(SSeeds, SSeeds.getUnlocalizedName());
	GameRegistry.registerItem(CBronzeItem, CBronzeItem.getUnlocalizedName());
	GameRegistry.registerItem(Ambrosia, Ambrosia.getUnlocalizedName());
	GameRegistry.registerItem(PoplarWoodStick, PoplarWoodStick.getUnlocalizedName());
	GameRegistry.registerItem(CBNugget, CBNugget.getUnlocalizedName());
	GameRegistry.registerItem(IGNugget, IGNugget.getUnlocalizedName());
	GameRegistry.registerItem(SINugget, SINugget.getUnlocalizedName());
	GameRegistry.registerItem(CBChest, CBChest.getUnlocalizedName());
	GameRegistry.registerItem(CBHelm, CBHelm.getUnlocalizedName());
	GameRegistry.registerItem(CBBoot, CBBoot.getUnlocalizedName());
	GameRegistry.registerItem(CBLegg, CBLegg.getUnlocalizedName());
	GameRegistry.registerItem(GWarChest, GWarChest.getUnlocalizedName());
	GameRegistry.registerItem(GWarHelm, GWarHelm.getUnlocalizedName());
	GameRegistry.registerItem(GWarBoots, GWarBoots.getUnlocalizedName());
	GameRegistry.registerItem(GWarLegg, GWarLegg.getUnlocalizedName());
	GameRegistry.registerItem(GreekFire, GreekFire.getUnlocalizedName());
}

}

 

Phew! ok that's all of the classes that involve the Entity

Im serious don't look at it!!

Link to comment
Share on other sites

Everything that involves rendering goes to Load (init), move your rendering code (from preInit) there.

 

And god help me - fix this code with Snowball.

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.

Link to comment
Share on other sites

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) {

}

}

 

like this? it is not making a difference

Im serious don't look at it!!

Link to comment
Share on other sites

Like This?

Main Registry




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?

Im serious don't look at it!!

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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