Posted March 10, 20178 yr Hello, it seems that I need some help for my new firework rocket. The idea is, to create a rocket that simply starts rain when it dies. The code works for the serverside of life but the rocket is not rendering on clientside Interesting enough is, that the minecraft rocket entity is created twice. The first time through onItemUse() in ItemFirework.class and then a second time in the class NetHandlerPlayClient. The whole class is client sided and public void handleSpawnObject(SPacketSpawnObject packetIn) is called. There we have: else if (packetIn.getType() == 76) { entity = new EntityFireworkRocket(this.clientWorldController, d0, d1, d2, ItemStack.EMPTY); } For my rocket, the whole NetHandlerPlayClient class isn't even called. And for this, my rocket does not render ingame. All I can notice is the starting sound of the rocket and my rain effect that is created on serverside when isDead() is called. After hours of research I'm simply out of ideas at this point.
March 10, 20178 yr Author Oki: main Mod file: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/Waterworks.java registers entities with InitEntities.init(); (works as commonProxy here) This is my InitEntities class: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/init/InitEntities.java This is the client render register stuff: https://github.com/Terpo/Waterworks/blob/master/src/main/java/org/terpo/waterworks/proxy/ClientProxy.java I pushed my latest updates to the repo.
March 10, 20178 yr Author Because I can.... fail. I think that I copied that part from a tutorial or something and did not check all parameters for the function. Now its working.
March 10, 20178 yr Author So, I tried to find it but no chance so far. Maybe the tutorials were right, but the Factory stuff around the registering was confusing me. There are not many tutorials for entities in 1.11.2 so far. And straight copy of 1.10 / 1.9.4 tuts will result in a deprecated registration. My main source was the wiki of McJty: http://wiki.mcjty.eu/modding/index.php/Mobs-1.9 But as far as I can see its correct there.
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.