My mod has two entities, one called EntityMagicMissile, and one called EntityFirebolt, both of which extend a superclass called EntitySpell, which itself extends EntityThrowable. Each is a projectile, fired from a wand (each one is fired from a different wand). Magic missile is supposed to generate CRIT_MAGIC particles, while firebolt is supposed to generate flame and smoke particles. The problem is, BOTH of them generate only magic particles! Even stranger, I put some debug code in to print stuff to the console when the method's for spawning particles are called. According to the console, magic missile calls only its own particle method, but firebolt calls BOTH its own particle method AND magic missile's, despite the entity being coded to ONLY call its own method, and neither method being public in the first place! Frankly, I cant make heads or tails of this.
It looks like you may have registered your entities incorrectly, causing an EntityMagicMissile to be spawned on the client when you spawn an EntityFirebolt on the server. Post your entity registration code.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You registered both entities with the same ID, which is used in the packet that spawns the entity on the client.
If multiple entities share an ID, Forge will spawn the one that was registered first (EntityMagicMissile in this case).
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Okay, so this is really bizarre.
My mod has two entities, one called EntityMagicMissile, and one called EntityFirebolt, both of which extend a superclass called EntitySpell, which itself extends EntityThrowable. Each is a projectile, fired from a wand (each one is fired from a different wand). Magic missile is supposed to generate CRIT_MAGIC particles, while firebolt is supposed to generate flame and smoke particles. The problem is, BOTH of them generate only magic particles! Even stranger, I put some debug code in to print stuff to the console when the method's for spawning particles are called. According to the console, magic missile calls only its own particle method, but firebolt calls BOTH its own particle method AND magic missile's, despite the entity being coded to ONLY call its own method, and neither method being public in the first place! Frankly, I cant make heads or tails of this.
Here are the relevant entity classes:
EntitySpell: http://pastebin.com/FTTtGMqs
EntityMagicMissile: http://pastebin.com/bjvfeXRV
EntityFirebolt: http://pastebin.com/4fcYcuYE
And here is the console log: http://pastebin.com/JytJSXgQ
My first mod =D
It looks like you may have registered your entities incorrectly, causing an EntityMagicMissile to be spawned on the client when you spawn an EntityFirebolt on the server. Post your entity registration code.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
http://pastebin.com/yHxkmpJt
My first mod =D
You registered both entities with the same ID, which is used in the packet that spawns the entity on the client.
If multiple entities share an ID, Forge will spawn the one that was registered first (EntityMagicMissile in this case).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
SIGH. I cant BELIEVE I made that mistake. Thank you for your help. It works perfectly now.
My first mod =D