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

So, this is just a simple question I have, and couldn't find anything on google about it, what are the parameters of createNewTileEntity, I know the world parameter, but what is the second one? Is it metadata? I hope so, because I have a metadata block, and would like to have a different tile for each one. If it isn't I have ways of working round it, and using one tileentity, I could use the getMetadata method in the tileentity.

 

Thanks.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

  • Author

Okay, thanks

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

  • 10 months later...

And does it correspond to the created block's metadata, or the used ItemStack's damage? Also, can I work around this method completely? I'd rather have my ItemBlock class do the work.

Yeah, but what I thought I'd do is like:

w.setBlock(x, y, z, machineBlock);

w.setTileEntity(x, y, z, MachineRegistry.getMachineClass(itemStack.getStackDamage()).newInstance());

I'll beat Dies to it.

 

No, NO, No, no, NO

 

 

Now, joking aside.

 

In your block that has a tileentity associated with it, it should automatically create the tile when the block is placed.

 

You place the block, the tile is instantly placed also.

 

also, it is more like w.setblockstate(pos, machineBlock.getdefaultstate);  [that is for 1.8]  - oops

 

for 1.7, you are fine for block placement, same comment on tile.

Long time Bukkit & Forge Programmer

Happy to try and help

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.