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

Hi everyone!

 

I'm constructing kinda strange entity container block, which contains one other item/block (like pipe or wire) for each of its sides.

What I wanna is to make my container simulate like it's one of its contained items.

Example: I'm putting glass cable into my container's west slot, then put regular glass wire adjacent to it, and when glass wire block looks up for the neighbour wire blocks, my container pretends to be glass wire and the two happily connect.

Per my investigation on MC code, there's always World.getBlockTileEntity that returns exact raw entity for the provided coordinate, without any notion of requester's identity. So my crazy idea seems to be impossible to implement. But I'm pretty new to Minecraft modding and might be mistaken.

 

Thanks

 

eh, if I'm correct it could be done using ASM library - adding a hook to the getBlockTileEntity (you have to be a core mod in order to be able to do that), then you could find out who's called that method (more here or here). but the perfomance cost wouldn't be small and it is quite extreme and messy solution. I don't recommend this, but it is imho doable...

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

  • Author

I don't think it would be a good idea for me to use instrumentation and like, as i highly doubt that other people would be grateful for such a hack  ;D

Anyway, many thanks for confirming my suspicions.

 

[EDIT]

 

At least, TileEntity retrieval can be hooked by wrapping getChunkBlockTileEntity via instrumentation. Still requires ASM toolset and a coremod, though can partially solve issue with posing one entity as other one.

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.