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
comment_264853

Hello everyone,

 

I'm trying to create a block that is able to switch between several tile entities, each time it's activated. However, world.removeTileEntity(blockpos) and world.setTileEntity(blockpos, tileentity) don't seem to work. Is that because my block only returns one tile entity in the createNewTileEntity(world, meta) method? What should I use to do what I want to do? 

Thanks in advance (:

  • Author
comment_264858

I'm trying to make a block that has multiple functionalities. Like a furnace and a chest and a battery or something. I'd like to be able to dynamically add more tile entities to this list, so, the block should be able to iterate through this list. I got it to the point where setTileEntity seems to set the new tile entity, but when I try to access it later, it changed back to the original tile entity.

comment_264859

There is nothing stopping you from implementing all functionalities you want your block to have and have a field that controls them if you want your block to 'switch'. If you simply want it to have all the functionalities you can and should simply use capabilities. If you want to have a 'dynamic list' you can implement your functionalities in some kind of wrappers and have that list of wrappers in your tile entity. Or something different, depending on the way you want everything to be handled. It is really more of a design choice ;)

 

 

  • Author
comment_264861
4 minutes ago, V0idWa1k3r said:

There is nothing stopping you from implementing all functionalities you want your block to have and have a field that controls them if you want your block to 'switch'. If you simply want it to have all the functionalities you can and should simply use capabilities. If you want to have a 'dynamic list' you can implement your functionalities in some kind of wrappers and have that list of wrappers in your tile entity. Or something different, depending on the way you want everything to be handled. It is really more of a design choice ;)

 

 

So, I guess you could do that... I'll give it a try, thx!

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.