Posted June 25, 201510 yr my code isn't working to spawn the entitys client side. public void setDead(){ if (!this.worldObj.isRemote){ for (int i = 0 ; i < 2 ; i++){ EntityCell cell = this.createInstance(); cell.setPosition(this.posX, this.posY, this.posZ); this.worldObj.spawnEntityInWorld(cell); } super.setDead(); } } public EntityCell createInstance() { return new EntityCell(this.worldObj); } any Ideas? Im serious don't look at it!!
June 25, 201510 yr Author yes package com.OlympiansMod.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase; import com.OlympiansMod.Main.MainRegistry; import cpw.mods.fml.common.registry.EntityRegistry; public class MEntity { public static void MainRegistry(){ registerEntity(); } public static void registerEntity(){ createEntity(EntityGreekFire.class, "GreekFire"); createEntity(EntityBullet.class, "Bullet"); createEntity(EntitySGuardian.class, "SGuardian"); createEntity(EntitySGolem.class, "SGolem"); createEntity(EntityUndead.class, "Undead"); createEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek"); createEntity(EntityThunderBolt.class, "ThunderBolt"); createEntity(EntityMasterBolt.class, "MasterBolt"); createEntity(Zeus.class, "Zeus"); createEntity(Arachne.class, "Arachne"); createEntity(EntityCell.class, "EntityCell"); } public static void createEntity(Class entityClass, String entityName){ EntityRegistry.registerModEntity(EntityGreekFire.class, "GreekFire", 4013479, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 302942, MainRegistry.modInstance, 1, 80, true); EntityRegistry.registerModEntity(EntitySGuardian.class, "SGaurdian", 301320, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntitySGolem.class, "EntitySGolem", 420193, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndead.class, "UndeadRoman", 403998, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek", 403698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityThunderBolt.class, "ThunderBolt", 413698, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityMasterBolt.class, "MasterBolt", 413798, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(Zeus.class, "Zeus", 414798, MainRegistry.modInstance, 100, 1, true); EntityRegistry.registerModEntity(Arachne.class, "Arachne", 414799, MainRegistry.modInstance, 80, 1, true); EntityRegistry.registerModEntity(EntityCell.class, "EntityCell", 414789, MainRegistry.modInstance, 80, 1, true); } } Im serious don't look at it!!
June 25, 201510 yr Author also Why doesn't this work? protected void despawnEntity() { this.isBurning(); } } I set the entity on fire and it doesn't despawn. Im serious don't look at it!!
June 25, 201510 yr Your entity registry code is f*cked up... Issues with it are: - You register every Entity atleast 10 times. - What is up with those Entity IDs? - You messed up the trackingRange and updateFrequency parameters in some of the calls to registerModEntity() . - Making a method for registering entities is redundant. Why make a method with 1 line of code, instead of a single line of code? No methods needed. - And if you still decide to make a method (just don't), actually use the parameters... Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
June 25, 201510 yr my code isn't working to spawn the entitys client side. public void setDead(){ if (!this.worldObj.isRemote){ for (int i = 0 ; i < 2 ; i++){ EntityCell cell = this.createInstance(); -SNIPPED- any Ideas? This is server side, not client side.
June 28, 201510 yr Author so you wan m to register my entitys like this? package com.OlympiansMod.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase; import com.OlympiansMod.Main.MainRegistry; import com.sun.xml.internal.bind.v2.model.core.ID; import cpw.mods.fml.common.registry.EntityRegistry; public class MEntity { public static void MainRegistry(){ registerEntity(); } public static void registerEntity(){ createEntity(EntityGreekFire.class, "GreekFire"); createEntity(EntityBullet.class, "Bullet"); createEntity(EntitySGuardian.class, "SGuardian"); createEntity(EntitySGolem.class, "SGolem"); createEntity(EntityUndead.class, "Undead"); createEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek"); createEntity(EntityThunderBolt.class, "ThunderBolt"); createEntity(EntityMasterBolt.class, "MasterBolt"); createEntity(Zeus.class, "Zeus"); createEntity(Arachne.class, "Arachne"); createEntity(EntityCell.class, "EntityCell"); } public static void createEntity(Class entityClass, String entityName){ int randomID = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerModEntity(entityClass, entityName, randomID, MainRegistry.modInstance, 1, 80, true); //EntityRegistry.registerModEntity(EntityGreekFire.class, "GreekFire", 4013479, MainRegistry.modInstance, 1, 80, true); //EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 302942, MainRegistry.modInstance, 1, 80, true); //EntityRegistry.registerModEntity(EntitySGuardian.class, "SGaurdian", 301320, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntitySGolem.class, "EntitySGolem", 420193, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntityUndead.class, "UndeadRoman", 403998, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntityUndeadGreekArcher.class, "UndeadArcherGreek", 403698, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntityThunderBolt.class, "ThunderBolt", 413698, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntityMasterBolt.class, "MasterBolt", 413798, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(Zeus.class, "Zeus", 414798, MainRegistry.modInstance, 100, 1, true); //EntityRegistry.registerModEntity(Arachne.class, "Arachne", 414799, MainRegistry.modInstance, 80, 1, true); //EntityRegistry.registerModEntity(EntityCell.class, "EntityCell", 414789, MainRegistry.modInstance, 80, 1, true); } } Im serious don't look at it!!
June 28, 201510 yr Author yeah but I cant use the same id for every entity can I? Im serious don't look at it!!
June 28, 201510 yr Author so then I have to make an entity registry for every one of my entitys then right? Im serious don't look at it!!
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.