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

My block is supposed to save the block placer as the owner when it is placed which it does correctly on both client and server side but when checking it afterwords anywhere else it only shows up server-side. Anyone know why?

 

https://github.com/BeardlessBrady/Currency-Mod/blob/master-2-1.12/src/main/java/beardlessbrady/modcurrency/block/vending/BlockVending.java#L61

 

 

Edited by BeardlessBrady

  • Author

I was playing around with things since it wasn't saving correctly, saving it as a string was one of those things.

I have tried adding tile.markDirty() after setting owner but it doesn't seem to have changed anything, what exactly do I need to do to re-send the packet?

 

https://github.com/BeardlessBrady/Currency-Mod/blob/64b43d05b8e67f0b6ae469889cd5823ae05ff23d/src/main/java/beardlessbrady/modcurrency/block/vending/BlockVending.java#L62

  • Author

Background: I have a base tile entity I extend the tile entity off of which is where the owner is created and saved via NBT stuff.

 

Peculiarly if I move the NBT stuff for the owner to the main tile not the one its extended everything works fine despite the nbt methods running super first? 

 

EDIT: I figured it out. So when @Overriding #getUpdatePacket() I was just doing:

super.getUpdatePacket();
NBTTagCompound compound = new NBTTageCompound;

but I didn't realize that wasn't using the super's method correctly so I changed it to:

NBTTagCompound compound = super.getUpdatePacket().getNbtCompound();

 

Thanks for trying to help!

Edited by BeardlessBrady

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.