cubex2 Posted August 7, 2015 Posted August 7, 2015 Hey, is it possible to accomplish a block that can face different directions, like a furnace, without using a lot of model files? The direction is stored in a tile entity which means I have to use an unlisted property. I basically search something like the "y" attribute in block state files. Quote
Choonster Posted August 7, 2015 Posted August 7, 2015 The furnace only uses a single model rotated around the y axis different amounts depending on the facing property. Is there a reason you have to use an unlisted property? It's entirely possible to use a normal property whose value is set from a TileEntity in Block#getActualState or Block#getExtendedState , look at BlockFlowerPot for an example. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
cubex2 Posted August 7, 2015 Author Posted August 7, 2015 I already use normal properties for different variants. Can I have more than 16 different states this way? Quote
Choonster Posted August 7, 2015 Posted August 7, 2015 Yes, you can have as many states as you want; it's just that you can only store 16 possible states in the metadata. Beyond that you have to use a TileEntity and one of the two methods I mentioned. Most Forge and vanilla code uses Block#getActualState , Block#getExtendedState is only used for rendering ISmartBlockModel s and returns the result of Block#getActualState by default. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Recommended Posts
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.