Open WenXin20 opened 4 years ago
Known issue. Uncertain about the fix so I didn't make an issue ticket on my own.
Technical details about what I have known so far (checked means addressed):
TileEntityRender
which require more context to be correctly rendered.BlockItem
.IBakedModel.getQuad
a proper Random
with seed from MathHelper.getCoordinateRandom
.BlockState.getOffsetType
and BlockState.getOffset
.TileEntityRenderer
.I did investigate into it a bit, but the only solution I have so far is way too massive and hacky. I won't go in depth about its details here.
Ah, it's not a big deal for me if nothing can be done.
For the flowers though, I don't believe it's completely random. Placing the any flower on the same block always gives it the same offset.
It is random in terms of different location, statistically.
@WenXin20 So I spent couple of hours to make some blocks works. New release has been on CurseForge. Notably:
Things still not working:
Chests and beds lost their preview due to this attempt.
Lily pad. Only works if you do something like this, or on ice block: Notice the random orientation is correctly handled.
Anything that will expand to more blocks after being placed.
Minecraft 1.15.2
Forge v31.1.39
Placement Preview v1.1.0
When placing a bed, the preview always faces the same direction, no matter which direction the player is facing.
Some other blocks, like double tall grass, doesn't preview the top state, only the bottom. Same with some modded blocks.