Jump to content

[1.11.2] extend Firework Rockets


Terpo

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.