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

Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.

     

If i helped you, don't forget pressing "Thank You" button. Thanks for your time.

Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.

   

 

Please do not do this, it isn't worth the extra save file size cost. I would rather see you make a texture for the two separate possible directions and use the metadata to store the direction.

 

Here is how I would do it:

when deciding the icon for the face:

if nbt (metadata) = 0 > choose north/south icon

if nbt = 1 > choose east/west icon

 

when placing the block:

use the code above to tell if the player is facing north or south, if they are set the metadata to 0, otherwise set it to 1.

 

From what you have said so far, I would assume this block is strictly visual and has no intended functionality other than being a block.

 

There appears to be some code in the Minecraft source that handles icon face rotation, but I haven't played with that yet. maybe later, as I do see myself hitting a similar problem in the future.

Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.

   

 

Please do not do this, it isn't worth the extra save file size cost. I would rather see you make a texture for the two separate possible directions and use the metadata to store the direction.

 

Here is how I would do it:

when deciding the icon for the face:

if nbt (metadata) = 0 > choose north/south icon

if nbt = 1 > choose east/west icon

 

when placing the block:

use the code above to tell if the player is facing north or south, if they are set the metadata to 0, otherwise set it to 1.

 

From what you have said so far, I would assume this block is strictly visual and has no intended functionality other than being a block.

 

There appears to be some code in the Minecraft source that handles icon face rotation, but I haven't played with that yet. maybe later, as I do see myself hitting a similar problem in the future.

  • Author

Only easy way for is too make tileentity and rotate it's renderer... Hope there are more easy ways.

   

Please do not do this, it isn't worth the extra save file size cost. I would rather see you make a texture for the two separate possible directions and use the metadata to store the direction.

 

Do you mean the world size?

The mod is mainly designed for my server, which we have a 500gb drive dedicated just for minecraft (and a few small things like Jenkins.. if it ever bloody works.), so that's not an issue.

The only reason I avoided tile entity at all was because I heard it was more RAM-consuming. However I eventually wanted to make some of the blocks a custom shape, and from what I've seen if I did that, there's no avoiding a tile entity. Maybe I should look into that, but I'll try your NBT thing first.

 

The blocks are entirely cosmetic. It's just a set of road blocks like you'd see in the street; we have a modern server, and we have Flans, it was a huge gap and I'm learning Java to fill it :P

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

There is way to avoid TileEntities in custom renderes. I've coded a library that does. I have example code for it too. But it still have one bug: It won't render if there is no full block in chunk section which shouldn't be issue for you since it's road block. Take a look in here: https://github.com/skore13/renderLib

Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib

You should always strive to use the least space possible when it comes to saves/ram usage and minimize the footprint of these blocks as much as possible. To me, that is just good practice. And seeing that these blocks are strictly cosmetic, I highly suggest looking into the log code more, as it seems that the log code is closes to what you are trying to achieve (save leaf support and vertical axis alignment).

 

I will try to look into icon rotation later to see if it is easy to rotate the texture face on a block (just don't hold me to this please).

  • Author

There is way to avoid TileEntities in custom renderes. I've coded a library that does. I have example code for it too. But it still have one bug: It won't render if there is no full block in chunk section which shouldn't be issue for you since it's road block. Take a look in here: https://github.com/skore13/renderLib

 

Looks pretty useful! How exactly would I go about using this?

 

You should always strive to use the least space possible when it comes to saves/ram usage and minimize the footprint of these blocks as much as possible. To me, that is just good practice. And seeing that these blocks are strictly cosmetic, I highly suggest looking into the log code more, as it seems that the log code is closes to what you are trying to achieve (save leaf support and vertical axis alignment).

 

I know that in general it's good practice. However, I'm sure I mentioned earlier that eventually, these blocks are custom rendered anyway and I was just trying to get something basic together first to help me learn. However, if it's easier to just go tile entity (or the thing Skore mentioned) then that's probably for the best.

 

When the mod is done, the roads would look like this (The blocks are from Redpower as an example)

517beaf888a70.jpg

 

I'm also making road signs which obviously are more important to have rendered.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

  • Author

This is all irrelevant;

I just realized that custom rendered tile entities (for example, a chest) don't get rendered after about 32 blocks. Which makes it totally useless for a road...

So unless anyone has an idea of how to force it to be rendered, it's impossible?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

How exactly would I go about using this?

Here is wiki I created:

https://github.com/skore13/renderLib/wiki

Now I'm working on rotation. But for your roads it's irrelevant. Also if you are missing anything rendering-related please tell me :)

Road signs: It's gonna be hard to create round signs... But I've idea (from vanilla code for rendering item in player's hand)

Also you have to override hitboxes for your road blocks but that's not as hard as custom renderers and I also want it in my library.

Creator of easy custom renderer library without tile entity. https://github.com/skore13/renderLib

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.