Jump to content

[1.7.10] Entity incorrectly rendering, doesn't use model requested


Recommended Posts

Posted

Hi, i am trying to render my entity, but when it renders, it is a white box and not the model i provided.

 

The entity will be shot when i right click an item.

 

How can i fix this so it uses my model i want it to use?

 

EntityFireball:

 

package main.java.mod.paperMario.entities;

 

import net.minecraft.entity.Entity;

import net.minecraft.entity.EntityLivingBase;

import net.minecraft.entity.projectile.EntityThrowable;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.util.DamageSource;

import net.minecraft.util.MovingObjectPosition;

import net.minecraft.world.World;

 

public class EntityFireball extends EntityThrowable {

 

public float size;

 

public EntityFireball(World par1World) {

super(par1World);

}

 

public EntityFireball(World par1World, EntityLivingBase par2EntityLiving) {

super(par1World, par2EntityLiving);

}

 

public EntityFireball(World par1World, double par2, double par4, double par6) {

super(par1World, par2, par4, par6);

}

 

@Override

protected void onImpact(MovingObjectPosition par1MovingObjectPosition) {

if (par1MovingObjectPosition.entityHit != null) {

par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.generic, 4);

}

 

for (int i = 0; i < 8; i++) {

this.worldObj.spawnParticle("smoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);

}

 

for (int i = 0; i < 800; i++) {

this.worldObj.spawnParticle("cloud", this.posX + this.rand.nextGaussian(), this.posY + (this.rand.nextGaussian() * 0.25F), this.posZ + this.rand.nextGaussian(), 0.0D, 0.0D, 0.0D);

}

 

if (!this.worldObj.isRemote) {

this.setDead();

}

}

 

@Override

protected float getGravityVelocity() {

return 0.001F;

}

 

}

 

 

RenderFireball:

 

package main.java.mod.paperMario.render;

 

import org.lwjgl.opengl.GL11;

import org.lwjgl.opengl.GL12;

 

import main.java.mod.paperMario.baseMod;

import main.java.mod.paperMario.entities.EntityFireball;

import main.java.mod.paperMario.entities.ModelFireball;

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelBiped;

import net.minecraft.client.renderer.entity.Render;

import net.minecraft.client.renderer.entity.RenderBiped;

import net.minecraft.entity.Entity;

import net.minecraft.entity.projectile.EntityArrow;

import net.minecraft.util.ResourceLocation;

 

public class RenderFireball extends Render {

 

protected ModelBase modelFireball;

 

private static final ResourceLocation res = new ResourceLocation(baseMod.MODID + ":" + "textures/entities/Fireball.png");

 

public RenderFireball() {

this.shadowSize = 0.4F;

this.modelFireball = new ModelFireball();

}

 

public void renderFireball(EntityFireball par1Entity, double par2, double par4, double par6, float par8, float par9) {

GL11.glPushMatrix();

GL11.glTranslatef((float) par2, (float) par4, (float) par6);

float var20 = 1F;

GL11.glEnable(GL12.GL_RESCALE_NORMAL);

GL11.glScalef(var20, var20, var20);

GL11.glNormal3f(var20, 0.0F, 0.0F);

 

this.modelFireball.render(par1Entity, 0F, 0F, -0.1F, 0F, 0F, 0.0625F);

 

GL11.glDisable(GL12.GL_RESCALE_NORMAL);

GL11.glPopMatrix();

}

 

@Override

public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {

this.renderFireball((EntityFireball) par1Entity, par2, par4, par6, par8, par9);

}

 

@Override

protected ResourceLocation getEntityTexture(Entity entity) {

if(entity instanceof EntityFireball) return res;

        return null;

}

}

 

 

ModelFireball:

 

package main.java.mod.paperMario.entities;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

 

public class ModelFireball extends ModelBase

{

  //fields

    ModelRenderer Shape1;

    ModelRenderer Shape2;

    ModelRenderer Shape3;

    ModelRenderer Shape4;

    ModelRenderer Shape5;

    ModelRenderer Shape6;

    ModelRenderer Shape7;

    ModelRenderer Shape8;

    ModelRenderer Shape9;

    ModelRenderer Shape10;

    ModelRenderer Shape11;

 

  public ModelFireball()

  {

    textureWidth = 128;

    textureHeight = 128;

   

      Shape1 = new ModelRenderer(this, 0, 55);

      Shape1.addBox(0F, 11F, 0F, 4, 1, 1);

      Shape1.setRotationPoint(-3F, 0F, 0F);

      Shape1.setTextureSize(128, 128);

      Shape1.mirror = true;

      setRotation(Shape1, 0F, 0F, 0F);

      Shape2 = new ModelRenderer(this, 0, 50);

      Shape2.addBox(0F, 10F, 0F, 6, 1, 1);

      Shape2.setRotationPoint(-4F, 0F, 0F);

      Shape2.setTextureSize(128, 128);

      Shape2.mirror = true;

      setRotation(Shape2, 0F, 0F, 0F);

      Shape3 = new ModelRenderer(this, 0, 45);

      Shape3.addBox(0F, 9F, 0F, 7, 1, 1);

      Shape3.setRotationPoint(-4F, 0F, 0F);

      Shape3.setTextureSize(128, 128);

      Shape3.mirror = true;

      setRotation(Shape3, 0F, 0F, 0F);

      Shape4 = new ModelRenderer(this, 0, 40);

      Shape4.addBox(0F, 8F, 0F, 7, 1, 1);

      Shape4.setRotationPoint(-4F, 0F, 0F);

      Shape4.setTextureSize(128, 128);

      Shape4.mirror = true;

      setRotation(Shape4, 0F, 0F, 0F);

      Shape5 = new ModelRenderer(this, 0, 35);

      Shape5.addBox(1F, 7F, 0F, 6, 1, 1);

      Shape5.setRotationPoint(-4F, 0F, 0F);

      Shape5.setTextureSize(128, 128);

      Shape5.mirror = true;

      setRotation(Shape5, 0F, 0F, 0F);

      Shape6 = new ModelRenderer(this, 0, 30);

      Shape6.addBox(0F, 6F, 0F, 4, 1, 1);

      Shape6.setRotationPoint(-1F, 0F, 0F);

      Shape6.setTextureSize(128, 128);

      Shape6.mirror = true;

      setRotation(Shape6, 0F, 0F, 0F);

      Shape7 = new ModelRenderer(this, 0, 25);

      Shape7.addBox(0F, 5F, 0F, 3, 1, 1);

      Shape7.setRotationPoint(-1F, 0F, 0F);

      Shape7.setTextureSize(128, 128);

      Shape7.mirror = true;

      setRotation(Shape7, 0F, 0F, 0F);

      Shape8 = new ModelRenderer(this, 0, 20);

      Shape8.addBox(0F, 4F, 0F, 2, 1, 1);

      Shape8.setRotationPoint(-2F, 0F, 0F);

      Shape8.setTextureSize(128, 128);

      Shape8.mirror = true;

      setRotation(Shape8, 0F, 0F, 0F);

      Shape9 = new ModelRenderer(this, 0, 10);

      Shape9.addBox(0F, 4F, 0F, 1, 1, 1);

      Shape9.setRotationPoint(-4F, 0F, 0F);

      Shape9.setTextureSize(128, 128);

      Shape9.mirror = true;

      setRotation(Shape9, 0F, 0F, 0F);

      Shape10 = new ModelRenderer(this, 0, 15);

      Shape10.addBox(0F, 5F, 0F, 1, 1, 1);

      Shape10.setRotationPoint(-3F, 0F, 0F);

      Shape10.setTextureSize(128, 128);

      Shape10.mirror = true;

      setRotation(Shape10, 0F, 0F, 0F);

      Shape11 = new ModelRenderer(this, 0, 5);

      Shape11.addBox(0F, 6F, 0F, 1, 1, 1);

      Shape11.setRotationPoint(-5F, 0F, 0F);

      Shape11.setTextureSize(128, 128);

      Shape11.mirror = true;

      setRotation(Shape11, 0F, 0F, 0F);

  }

 

  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)

  {

    super.render(entity, f, f1, f2, f3, f4, f5);

    setRotationAngles(f, f1, f2, f3, f4, f5, entity);

    Shape1.render(f5);

    Shape2.render(f5);

    Shape3.render(f5);

    Shape4.render(f5);

    Shape5.render(f5);

    Shape6.render(f5);

    Shape7.render(f5);

    Shape8.render(f5);

    Shape9.render(f5);

    Shape10.render(f5);

    Shape11.render(f5);

  }

 

  private void setRotation(ModelRenderer model, float x, float y, float z)

  {

    model.rotateAngleX = x;

    model.rotateAngleY = y;

    model.rotateAngleZ = z;

  }

 

  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)

  {

    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

  }

 

}

 

 

 

baseMod file:

 

package main.java.mod.paperMario;

 

import main.java.mod.paperMario.entities.EntityFireball;

import main.java.mod.paperMario.entities.ModEntities;

import main.java.mod.paperMario.items.ModItems;

import main.java.mod.paperMario.items.Mushroom;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.util.ResourceLocation;

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

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

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

import net.minecraft.creativetab.CreativeTabs;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

@Mod(modid = baseMod.MODID, version = baseMod.VERSION)

public class baseMod

{

    public static final String MODID = "papermario";

    public static final String VERSION = "1.0";

    @SidedProxy(clientSide = "main.java.mod.paperMario.ClientProxy", serverSide = "main.java.mod.paperMario.CommonProxy")

    public static CommonProxy proxy;

   

    @Instance(baseMod.MODID)

    public static baseMod modInstance;

   

    ResourceLocation res = new ResourceLocation(baseMod.MODID, "textures/items/Mushroom");

 

    public static CreativeTabs pmItemsTab = new CreativeTabs("tabMarioItems") {

        @Override

        @SideOnly(Side.CLIENT)

        public Item getTabIconItem() {

            return ModItems.Mushroom;

        };

    };

   

    public static void PreLoad(FMLInitializationEvent PreEvent)

    {

    ModEntities.mainRegistry();

    }

   

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

    EntityRegistry.registerModEntity(EntityFireball.class, "fireball", 1, this, 80, 3, true);

    ModItems.init();

    ModEntities.mainRegistry();

    }

   

    public static Item Mushroom;

   

    public void preInit(FMLPreInitializationEvent event)

    {

    proxy.registerRendering();

    }

}

 

 

ClientProxy:

 

package main.java.mod.paperMario;

 

import main.java.mod.paperMario.entities.EntityFireball;

import main.java.mod.paperMario.items.ModItems;

import main.java.mod.paperMario.render.RenderFireball;

import net.minecraft.client.renderer.entity.RenderSnowball;

import cpw.mods.fml.client.registry.RenderingRegistry;

import main.java.mod.paperMario.entities.ModelFireball;

 

public class ClientProxy extends CommonProxy

{

 

      public void registerRenderThings()

      {

      RenderingRegistry.registerEntityRenderingHandler(EntityFireball.class, new RenderFireball());

      }

 

      @Override

      public void registerItemRenders()

      {

     

      }

}

 

 

Item:

 

package main.java.mod.paperMario.items;

 

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

import main.java.mod.paperMario.baseMod;

import main.java.mod.paperMario.entities.EntityFireball;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.world.World;

 

public class FireFlower extends Item {

 

private String name = "FireFlower";

 

public FireFlower() {

 

setUnlocalizedName(baseMod.MODID + "_" + name);

setTextureName(baseMod.MODID + ":" + "FireFlower");

GameRegistry.registerItem(this, name);

setCreativeTab(baseMod.pmItemsTab);

setMaxStackSize(1);

}

 

public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)

{

if (!world.isRemote) {

itemstack.stackSize--;

world.spawnEntityInWorld(new EntityFireball(world, player));

}

return itemstack;

}

}

 

Posted

Hi

 

Sounds like your renderer isn't registered.

Do you call proxy.registerRenderThings()  anywhere?

 

You can test by putting System.out.println("reached..."); at appropriate points in your code.  In particular in the rendering code soRender - if it's called, you have a rendering problem.  If it's not called, you probably have an entity renderer registration problem.

 

-TGG

 

Posted

Ok, so i called the wrong method in my baseMod file, so now it calls proxy.registerRenderThings() , but i still just get a white box when it renders...

Posted

Methods don't get called magically. Only one of your init/preinit methods has @EventHandler. Put it in front of the other ones too.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

now when i launch minecraft, i get this error:

error:

[09:10:47] [main/INFO] [GradleStart]: No arguments specified, assuming client.

[09:10:47] [main/INFO] [GradleStart]: Extra: []

[09:10:48] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/James/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker]

[09:10:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

[09:10:48] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1232 for Minecraft 1.7.10 loading

[09:10:48] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_11, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre8

[09:10:48] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[09:10:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[09:10:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[09:10:48] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[09:10:49] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[09:10:49] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[09:10:49] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

[09:10:50] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker

[09:10:50] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker

[09:10:50] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[09:10:51] [main/INFO]: Setting user: Player390

[09:10:52] [Client thread/INFO]: LWJGL Version: 2.9.1

[09:10:53] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[09:10:53] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1232 Initialized

[09:10:53] [Client thread/INFO] [FML]: Replaced 182 ore recipies

[09:10:53] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[09:10:53] [Client thread/INFO] [FML]: Searching C:\Users\James\Downloads\forge-1.7.10-10.13.2.1232-src\eclipse\mods for mods

[09:10:53] [Client thread/INFO] [papermario]: Mod papermario is missing the required element 'name'. Substituting papermario

[09:10:56] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[09:10:56] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, papermario] at CLIENT

[09:10:56] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, papermario] at SERVER

[09:10:56] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:papermario

[09:10:57] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[09:10:57] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations

[09:10:57] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[09:10:57] [Client thread/INFO] [FML]: Applying holder lookups

[09:10:57] [Client thread/INFO] [FML]: Holder lookups applied

[09:10:57] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue

[09:10:57] [Client thread/ERROR] [FML]:

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{7.10.85.1232} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1232.jar) Unloaded->Constructed->Pre-initialized

Forge{10.13.2.1232} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1232.jar) Unloaded->Constructed->Pre-initialized

papermario{1.0} [papermario] (bin) Unloaded->Constructed->Errored

[09:10:57] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[09:10:57] [Client thread/ERROR] [FML]: Caught exception from papermario

java.lang.IllegalArgumentException: ID is already registered: Fireball

at net.minecraft.entity.EntityList.addMapping(EntityList.java:98) ~[forgeSrc-1.7.10-10.13.2.1232.jar:?]

at cpw.mods.fml.common.registry.EntityRegistry.registerGlobalEntityID(EntityRegistry.java:200) ~[forgeSrc-1.7.10-10.13.2.1232.jar:?]

at mod.paperMario.entities.ModEntities.createEntity(ModEntities.java:23) ~[bin/:?]

at mod.paperMario.entities.ModEntities.registerEntity(ModEntities.java:16) ~[bin/:?]

at mod.paperMario.entities.ModEntities.mainRegistry(ModEntities.java:11) ~[bin/:?]

at mod.paperMario.baseMod.preInit(baseMod.java:60) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]

at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.2.1232.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.7.10-10.13.2.1232.jar:?]

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.7.10-10.13.2.1232.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) [Loader.class:?]

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]

at GradleStart.bounce(GradleStart.java:107) [start/:?]

at GradleStart.startClient(GradleStart.java:100) [start/:?]

at GradleStart.main(GradleStart.java:55) [start/:?]

[09:10:57] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// My bad.

 

Time: 11/3/14 9:10 AM

Description: Initializing game

 

java.lang.IllegalArgumentException: ID is already registered: Fireball

at net.minecraft.entity.EntityList.addMapping(EntityList.java:98)

at cpw.mods.fml.common.registry.EntityRegistry.registerGlobalEntityID(EntityRegistry.java:200)

at mod.paperMario.entities.ModEntities.createEntity(ModEntities.java:23)

at mod.paperMario.entities.ModEntities.registerEntity(ModEntities.java:16)

at mod.paperMario.entities.ModEntities.mainRegistry(ModEntities.java:11)

at mod.paperMario.baseMod.preInit(baseMod.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

at net.minecraft.client.Minecraft.run(Minecraft.java:931)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:107)

at GradleStart.startClient(GradleStart.java:100)

at GradleStart.main(GradleStart.java:55)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at net.minecraft.entity.EntityList.addMapping(EntityList.java:98)

at cpw.mods.fml.common.registry.EntityRegistry.registerGlobalEntityID(EntityRegistry.java:200)

at mod.paperMario.entities.ModEntities.createEntity(ModEntities.java:23)

at mod.paperMario.entities.ModEntities.registerEntity(ModEntities.java:16)

at mod.paperMario.entities.ModEntities.mainRegistry(ModEntities.java:11)

at mod.paperMario.baseMod.preInit(baseMod.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:931)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:107)

at GradleStart.startClient(GradleStart.java:100)

at GradleStart.main(GradleStart.java:55)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_11, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 903359128 bytes (861 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.85.1232 Minecraft Forge 10.13.2.1232 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{7.10.85.1232} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1232.jar) Unloaded->Constructed->Pre-initialized

Forge{10.13.2.1232} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1232.jar) Unloaded->Constructed->Pre-initialized

papermario{1.0} [papermario] (bin) Unloaded->Constructed->Errored

Launched Version: 1.7.10

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics 2000 GL version 3.1.0 - Build 9.17.10.2932, Intel

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Anisotropic filtering is supported and maximum anisotropy is 16.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

[09:10:57] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\James\Downloads\forge-1.7.10-10.13.2.1232-src\eclipse\.\crash-reports\crash-2014-11-03_09.10.57-client.txt

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

 

 

Enitity registering class:

 

package mod.paperMario.entities;

 

import net.minecraft.entity.EntityList;

import mod.paperMario.baseMod;

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

 

public class ModEntities

{

public static void mainRegistry()

{

registerEntity();

}

 

public static void registerEntity()

{

createEntity(EntityFireball.class, "Fireball");

}

 

public static void createEntity(Class entityClass, String entityName)

{

int randomID = EntityRegistry.findGlobalUniqueEntityId();

 

EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomID);

EntityRegistry.registerModEntity(entityClass, entityName, randomID, baseMod.modInstance, 128, 1, true);

}

}

 

 

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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