JDuff Posted August 8, 2013 Posted August 8, 2013 I have been creating a custom arrow and I have managed to solve just about everything except one weird piece of behavior and maybe someone here can help me. I have copied the arrow code and sorted the custom texture bits out. When the arrow is shot it behaves as expected, renders correctly and so forth unless the range of the shot is under about 4 blocks, then the arrow renders either next to the character or about 2 blocks out from the target though the arrow is in the correct place (as determined by going and picking it up) just not rendered right. Is this an issue with the below code or should I be looking elsewhere? Register code EntityRegistry.registerGlobalEntityID(Entitybolt.class, "MagicBolt",EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(Entitybolt.class, "MagicBolt", EntityRegistry.findGlobalUniqueEntityId(), this, 41, 3, true); or From Entitybolt.java @Override @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) { this.setPosition(par1, par3, par5); this.setRotation(par7, par8); } Quote
GotoLink Posted August 8, 2013 Posted August 8, 2013 You are registering your entity twice. EntityRegistry.registerGlobalEntityID(Entitybolt.class, "MagicBolt",EntityRegistry.findGlobalUniqueEntityId()); Remove this part. And chose a number instead of using EntityRegistry.findGlobalUniqueEntityId(). Quote
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.