Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] Changing texture according to tile entity data
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
Varogh

[1.6.4] Changing texture according to tile entity data

By Varogh, January 21, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Varogh    0

Varogh

Varogh    0

  • Tree Puncher
  • Varogh
  • Members
  • 0
  • 7 posts
Posted January 21, 2014

I'm writing a machine that should change its textures on each side according to what the user sets it to (kinda like TE machines).

I saw how the standard minecraft furnace does it but metadata are not an option, as there would be more than 16 possible states.

 

Any idea an how to do it?

  • Quote

Share this post


Link to post
Share on other sites

TheGreyGhost    818

TheGreyGhost

TheGreyGhost    818

  • Reality Controller
  • TheGreyGhost
  • Members
  • 818
  • 3280 posts
Posted January 21, 2014

Hi

 

I would suggest to use a TileEntity, and either

1) Implement an ISimpleBlockRenderingHandler, and ask your TileEntity for the information in the ISBRH rendering method; or

2) Create a  TileEntitySimpleRenderingHandler for your TileEntity and render the texture there

 

The choice between the two boils down to -

1) will only get updated when the block changes so it's harder to animate (is possible with animated textures eg like lava)

2) gets updated every rendering frame, but isn't drawn at all if you're more than 64 blocks away.

 

-TGG

  • Quote

Share this post


Link to post
Share on other sites

Varogh    0

Varogh

Varogh    0

  • Tree Puncher
  • Varogh
  • Members
  • 0
  • 7 posts
Posted January 21, 2014

I have no intention on doing animations, so the first method should be enough. It also looks quite simple to use and kinda lightweight, so it's perfect.

 

Thanks!

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • The_Raven
      items not extending to java class(1.16)

      By The_Raven · Posted 9 minutes ago

      small question, but how to I make my registry items able to use the code in a java class. or could you tell me how to make the java class into an item. i know extends item, that's not what I'm talking about.
    • Rollng
      Game crashes while loading world

      By Rollng · Posted 12 minutes ago

      So optifine causing this?
    • LexManos
      No file association

      By LexManos · Posted 16 minutes ago

      Some zip managers like to take control of the .jar file extension away from Java. Make sure you have Java installed and try running Jarfix once, then try the installer again.
    • st4s1k
      [1.16.4] Smithing table custom recipe use durability

      By st4s1k · Posted 18 minutes ago

      That's unfortunate
    • Klarks
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks · Posted 29 minutes ago

      What should implement INamedContainerProvider 
  • Topics

    • The_Raven
      0
      items not extending to java class(1.16)

      By The_Raven
      Started 9 minutes ago

    • Rollng
      2
      Game crashes while loading world

      By Rollng
      Started 3 hours ago

    • Ripple
      1
      No file association

      By Ripple
      Started 31 minutes ago

    • st4s1k
      2
      [1.16.4] Smithing table custom recipe use durability

      By st4s1k
      Started 2 hours ago

    • Klarks
      14
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started 21 hours ago

  • Who's Online (See full list)

    • BobbyLikesCake
    • Somonestolemyusername
    • Rollng
    • The_Raven
    • MistyMarshes
    • Ultrawebsling
    • LexManos
    • Klarks
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] Changing texture according to tile entity data
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community