Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • 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.

  • 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.

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.