Posted September 1, 201213 yr After updating my mod from 1.3.1 to 1.3.2 I can't see my entities in the world even though I can hear them and spawn them with spawning eggs. Anyone else having similar problems? I know it's more of a minecraft problem than a forge problem but still this is a forum on which modders are mostly active. Before asking have you registered the entity inside EntityRegistry and it's render inside RenderingRegistry, yes I did that and I double checked it or asking if I have textures on their apropriate spots, yes I have but even If I wouldn't have them I could see the shadow of that entity. I have allso perfomed some quick tests and it seems like my entity wouldn't even be passed into the loaded entities list.
September 1, 201213 yr the question is here: HOW did you register your entities? A piece of your code would be very helpful then. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
September 2, 201213 yr Author I registered them in my core class(the initialize method gets called from load method), what I posted are just snippets of the code public void initialize() { EntityList.addMapping(DartEntity.class, "Dart", getOrCreatEntityID("Dart", 42)); } This method gets called from ClientProxy public void initializeRenders() { RenderingRegistry.registerEntityRenderingHandler(DartEntity.class, new DartRender()); }
September 2, 201213 yr Then you're registering them wrong, at least the first one: EntityList.addMapping(DartEntity.class, "Dart", getOrCreatEntityID("Dart", 42)); You have to use these methods to register your entity properly: EntityRegistry.registerGlobalEntityID(entity, entityName, EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(entity, entityName, id, mod.instance, trackingRange, updateFrequency, sendsVelocityUpdates); so I would say in your case: EntityRegistry.registerGlobalEntityID(DartEntity.class, "Dart", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(DartEntity.class, "Dart", 0, DartMod.instance, 128, 1, true); The ID in registerModEntity is mod-specific, so your first entity should get 0 as ID, then your second gets 1 as ID and so on. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
May 9, 201312 yr Then you're registering them wrong, at least the first one: EntityList.addMapping(DartEntity.class, "Dart", getOrCreatEntityID("Dart", 42)); You have to use these methods to register your entity properly: EntityRegistry.registerGlobalEntityID(entity, entityName, EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(entity, entityName, id, mod.instance, trackingRange, updateFrequency, sendsVelocityUpdates); so I would say in your case: EntityRegistry.registerGlobalEntityID(DartEntity.class, "Dart", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(DartEntity.class, "Dart", 0, DartMod.instance, 128, 1, true); The ID in registerModEntity is mod-specific, so your first entity should get 0 as ID, then your second gets 1 as ID and so on. Wow, thanks! This really helped me c:
May 9, 201312 yr Then you're registering them wrong, at least the first one: EntityList.addMapping(DartEntity.class, "Dart", getOrCreatEntityID("Dart", 42)); You have to use these methods to register your entity properly: EntityRegistry.registerGlobalEntityID(entity, entityName, EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(entity, entityName, id, mod.instance, trackingRange, updateFrequency, sendsVelocityUpdates); so I would say in your case: EntityRegistry.registerGlobalEntityID(DartEntity.class, "Dart", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(DartEntity.class, "Dart", 0, DartMod.instance, 128, 1, true); The ID in registerModEntity is mod-specific, so your first entity should get 0 as ID, then your second gets 1 as ID and so on. Wow, thanks! This really helped me c: heh, it's like a bit outdated Anyway, you need only the registerModEntity now. The registerGlobalEntityID isn't needed anymore and also I don't recommend to use it, because it has an ID limitation of max. 256 IDs. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
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.