Glistre Posted July 29, 2016 Share Posted July 29, 2016 java.lang.IllegalArgumentException: Duplicate id value for 18! at net.minecraft.entity.DataWatcher.func_75682_a(SourceFile:64) I get this crash when Minecraft tries to spawn my entities in the world package com.glistre.glistremod.init; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.effects.potions.splash.EntitySplashProjectile; import com.glistre.glistremod.effects.potions.splash.ItemSplashPotion; import com.glistre.glistremod.entities.blacktobie.EntityBlackTobo; import com.glistre.glistremod.entities.guardian.EntityTobieSkel; import com.glistre.glistremod.entities.king.EntityTobieKing; import com.glistre.glistremod.entities.queen.EntityTobieQueen; //import com.glistre.glistremod.entities.unused.EntityTobie; import com.glistre.glistremod.entities.wolf.EntityBlackWolf; import com.glistre.glistremod.entities.wolf.EntityGlistreWolf; import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt; import com.glistre.glistremod.projectiles.blaster.EntityEnderBoltFireball; import com.glistre.glistremod.projectiles.tobyworstsword.TobyEntityProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyRenderProjectile; import com.glistre.glistremod.tabs.TabRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraft.entity.EntityList; import net.minecraft.item.Item; import net.minecraft.potion.PotionEffect; public class GlistreEntityRegistry { public static void GlistreMod(){ initializeEntity(); registerEntity(); } public static Item splash_poison_protection; // Tobie's Worst Enemy Sword public static Item tobie_worst_projectile_1; public static int modEntityID = 0; public static void initializeEntity(){ splash_poison_protection = new ItemSplashPotion(17, "splash_poison_protection", new PotionEffect[]{new PotionEffect(31, 1200)}, 888888).setUnlocalizedName("potion.splash_poison_protection").setCreativeTab(TabRegistry.tab_potion); //TOBIE'S WORST ENEMY Sword/Item tobie_worst_projectile_1 = new TobyProjectile(tobie_worst_projectile_1, "tobie_worst_projectile_1").setUnlocalizedName("tobie_worst_projectile_1").setCreativeTab(TabRegistry.tab_potion); } public static void registerEntity() { // 1.8 removed crash GameRegistry.registerItem(splash_poison_protection, splash_poison_protection.getUnlocalizedName()); //SPLASH POTION EntityRegistry.registerModEntity(EntitySplashProjectile.class, "splash_poison_protection", ++modEntityID, GlistreMod.instance, 80, 3, true); //1.8 removed crash // TOBIE'S WORST ENEMY GameRegistry.registerItem(tobie_worst_projectile_1, tobie_worst_projectile_1.getUnlocalizedName()); EntityRegistry.registerModEntity(TobyEntityProjectile.class, "tobie_worst_projectile_1", ++modEntityID, GlistreMod.instance, 80, 3, true); // BLASTERS EntityRegistry.registerModEntity(EntityBlasterBolt.class, "blaster_bolt_1" , ++modEntityID, GlistreMod.instance, 128, 10, true); EntityRegistry.registerModEntity(EntityEnderBoltFireball.class, "ender_bolt_1", ++modEntityID, GlistreMod.instance, 80, 3, true); // MOBS EntityRegistry.registerModEntity(EntityGlistreWolf.class, "glistre_wolf", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityBlackWolf.class, "black_wolf", ++modEntityID, GlistreMod.instance, 80, 3, false); // EntityRegistry.registerEgg (EntityBlackWolf.class, 0xFFD700, 0xc5b358); // EntityList.classToStringMapping.put(ItemRegistry.item_spawn_egg_2, "black_wolf"); EntityRegistry.registerModEntity(EntityBlackTobo.class, "corrupted_tobie", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieSkel.class, "tobie_skelly_guardian", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieKing.class, "tobie_king", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieQueen.class, "tobie_queen_elizabeth", ++modEntityID, GlistreMod.instance, 80, 3, false); } } Client proxy package com.glistre.glistremod.proxies; import java.awt.Color; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.fml.client.registry.RenderingRegistry; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.effects.EntityPortalFreonFX; import com.glistre.glistremod.effects.potions.splash.EntitySplashProjectile; import com.glistre.glistremod.effects.potions.splash.RenderSplashPotion; import com.glistre.glistremod.entities.*; import com.glistre.glistremod.entities.blacktobie.BlackModelTobo; import com.glistre.glistremod.entities.blacktobie.BlackRenderTobo; import com.glistre.glistremod.entities.blacktobie.EntityBlackTobo; import com.glistre.glistremod.entities.guardian.EntityTobieSkel; import com.glistre.glistremod.entities.guardian.TobieSkelRender; import com.glistre.glistremod.entities.king.EntityTobieKing; import com.glistre.glistremod.entities.king.TobieKingRender; import com.glistre.glistremod.entities.king.TobieModelKing; import com.glistre.glistremod.entities.queen.EntityTobieQueen; import com.glistre.glistremod.entities.queen.TobieModelQueen; import com.glistre.glistremod.entities.queen.TobieQueenRender; import com.glistre.glistremod.entities.wolf.BlackModelWolf; import com.glistre.glistremod.entities.wolf.BlackRenderWolf; import com.glistre.glistremod.entities.wolf.EntityBlackWolf; import com.glistre.glistremod.entities.wolf.EntityGlistreWolf; import com.glistre.glistremod.entities.wolf.GlistreModelWolf; import com.glistre.glistremod.entities.wolf.GlistreRenderWolf; import com.glistre.glistremod.init.BlockRegistry; import com.glistre.glistremod.init.GlistreEntityRegistry; import com.glistre.glistremod.init.ItemRegistry; import com.glistre.glistremod.init.Recipes; //import com.glistre.glistremod.items.bow.BusterBowRenderer; import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt; import com.glistre.glistremod.projectiles.blaster.EntityEnderBoltFireball; import com.glistre.glistremod.projectiles.blaster.EntitySceptreBolt; import com.glistre.glistremod.projectiles.blaster.RendreBlast; import com.glistre.glistremod.projectiles.blaster.RendreBlast2; import com.glistre.glistremod.projectiles.blaster.RendreBlast3; import com.glistre.glistremod.projectiles.tobyworstsword.TobyEntityProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyRenderProjectile; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ClientProxy extends CommonProxy { @Override public void Init(){ this.registerRenders(); ItemRegistry.registerRenders(); BlockRegistry.registerRenders(); } @Override public void registerRenders(){ //removed from 1.8 MinecraftForgeClient.registerItemRenderer(ItemRegistry.custom_bow_1, new BusterBowRenderer()); // GlistreEntityRegistry.registerEntity(); // RenderingRegistry.registerEntityRenderingHandler(EntityGlistreWolf.class, new GlistreRenderWolf(Minecraft.getMinecraft().getRenderManager(), new ModelMyMob(), 0.2F)); RenderingRegistry.registerEntityRenderingHandler(EntityGlistreWolf.class, new GlistreRenderWolf(Minecraft.getMinecraft().getRenderManager(), new GlistreModelWolf(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlackWolf.class, new BlackRenderWolf(Minecraft.getMinecraft().getRenderManager(), new BlackModelWolf(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlackTobo.class, new BlackRenderTobo(Minecraft.getMinecraft().getRenderManager(), new BlackModelTobo(), 0.7F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieSkel.class, new TobieSkelRender(Minecraft.getMinecraft().getRenderManager(), new BlackModelTobo(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieQueen.class, new TobieQueenRender(Minecraft.getMinecraft().getRenderManager(), new TobieModelQueen(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieKing.class, new TobieKingRender(Minecraft.getMinecraft().getRenderManager(), new TobieModelKing(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlasterBolt.class, new RendreBlast(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntityEnderBoltFireball.class, new RendreBlast2(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntitySceptreBolt.class, new RendreBlast3(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(TobyEntityProjectile.class, new TobyRenderProjectile(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntitySplashProjectile.class, new RenderSplashPotion(Minecraft.getMinecraft().getRenderManager())); // RenderingRegistry.registerEntityRenderingHandler(EntitySplashProjectile.class, new RenderSplashPotion(GlistreEntityRegistry.splash_poison_protection)); } @Override public void addParticleEffect(EntityFX particle) { double motionX = particle.worldObj.rand.nextGaussian() * 0.02D; double motionY = particle.worldObj.rand.nextGaussian() * 0.02D; double motionZ = particle.worldObj.rand.nextGaussian() * 0.02D; EntityFX particleMysterious = new EntityPortalFreonFX( particle.worldObj, particle.posX + particle.worldObj.rand.nextFloat() * particle.width * 2.0F - particle.width, particle.posY + 0.5D + particle.worldObj.rand.nextFloat() * particle.height, particle.posZ + particle.worldObj.rand.nextFloat() * particle.width * 2.0F - particle.width, motionX, motionY, motionZ); Minecraft.getMinecraft().effectRenderer.addEffect(particle); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.