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

What is the best way to tell a tile entity where it is upon placement? Every time minecraft starts, it creates tile entities using the block class that the tile entity comes from. So I can't set up variables that are set on the block's placement, because they would not be initialized when minecraft started, or they would all start the same and all my tile entities of that type would think they have the same location. So how would I tell a tile entity where it is when I place it?

 

My only idea so far is to use my renderer to tell it where it is, which just seems like awful etiquette to me.

Read my thoughts on my summer mod work and tell me what you think!

http://www.minecraftforge.net/forum/index.php/topic,8396.0.html

 

I absolutely love her when she smiles

I've noticed that. By default you don't even get the metadata... you have to find and override a specific function. It seems a shortcoming of Forge.

 

To the Suggestions board!

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

Tile entities store their coordinates. While you can't use those coordinates to check upon creation via the block, you can check in the constructor of the TileEntity.

  • Author

I gave my tile entity a constructor and use the xCoord, yCoord, and zCoord variables int it and all of them just returned as 0. Is there a certain point where they get set, and where I can start using them?

Read my thoughts on my summer mod work and tell me what you think!

http://www.minecraftforge.net/forum/index.php/topic,8396.0.html

 

I absolutely love her when she smiles

I gave my tile entity a constructor and use the xCoord, yCoord, and zCoord variables int it and all of them just returned as 0. Is there a certain point where they get set, and where I can start using them?

After the constructor, but before onUpdate(). And probably before all the other functions too. Which is why I still say it would be useful to put those args in the block constructor.

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

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.