#custom log texture error (1.21.0)
44 messages · Page 1 of 1 (latest)
the problem was with block states, I wrote some datagen code to correctly make the blockstates and models. I'll create a pull request with my fixes shortly. I'd recommend you understand what I did and why I did it (I can help explain), especially if you plan to make more blocks with the moon visible mechanic
@stark cairn
yoop i'm here let me look at it
yeah I think I understand what you did but i'm not sure if I completely understand it
though it doesn't work fully
@fresh salmon renaming one of the texture files to moon_oak_log fixes the item texture but not the block
I tested with my own textures and it worked, you might not have enough texture files, it needs: moon_oak_log, moon_oak_log_top, moon_oak_log_on, and moon_oak_log_top_on
I figured these would be wanted for what you're doing but if some of these textures should be merged I can help fix that
well the off state is supposed to be the minecraft oak log texture so it blends in when the moon isn't visible
and I can't find the actual texture file anywhere that I can just put it in and call it good, so I've been editing the JSON directly to achieve that. Also, even with some of the files being named moon_oak_log_on and moon_oak_top, the block inworld was still black/purple
yeah I just checked even with all 4 it doesn't set the block texture correctly
@fresh salmon (yeah I have no idea how often you want me to ping you) I've added all 4 files and it just doesn't put it on the block. Re-ran datagen and it still doesn't work
I noticed in the creative tab there are 2 block items for the block, only one of them works, if you look at blockstate data in f3 it should have 3 things: axis, moon_visible, and spawned. If it does not try the other block item
That's one of 2 other things. I have no idea how the second one even got in there, and suddenly all oak leaves are white.
@fresh salmon Upon inspection, the no block texture version correctly has rotation and is under #logs_that_burn and the one that does have texture always orients in the X direction, and has the other 2 variables, but texture doesn't change to oak log which i'll fix eventually.
@fresh salmon dunno if you saw the ping on prev msg or not, but the sapling uses the textureless/orientable version when growing a tree, if you have any suggestions on where I've gone wrong i'd appreciate it.
turns out I did a dumb and stripped_moon_oak_log ID was of the moon oak log
still hasn't fixed 100% of errors
... what? I gotta go for a while so I'll push the changes thus far
pushed, stupid long commit msg
@fresh salmon any theories on this weird AF texture mapping issue? It's never the same block and the rotation is locked when placed or generated.
I'm not sure, but I made a pull request to your github where I used mixins instead of blockstates to switch between the 2 types. This should fix the issue and makes the logs behave more like normal logs.
If you want to still use blockstates instead of mixins and want to resolve that issue, I did notice a similar problem caused by one of the textures somehow getting corrupted when I pulled from github, replacing the texture made it work normally.
iunno what mixins are and I don't know how to use them, where they "stand", etc.
oh wait I see what happened with the texture
I fully understand this stance, mixins are powerful but can break stuff. I recommend that you learn and get more comfortable with mixins at some point, but your blockstate solution does work fine.
@fresh salmon with the mixin, the texture doesn't change (and item in inv's top texture is incorrect)
wait I see the texture changes only when it gets updated by other blocks
not ideal for what I'm trying to do with these blocks
it requires a block update to change the model, I set it to have display ticks to update kinda frequently. If you want it to update instantly it would have to check every tick.
decoration ticks? Also now the moon oak leaves (uses moon visible) are textureless
Its something meant for rendering particles but it seemed to work here, you can just get rid of the method randomDisplayTick that I added and put your old system with scheduled ticks to get your old behaviour back
So what led to the leaves suddenly forgetting their textures?
I didn't notice the texture, you can just rename it to moon_oak_leaves.png and it should work
how do I reference the mixin instead of the BooleanProperty?
I've been looking and can't figure it out. I'm a novice at Java, been taking a class at school for 1 sem so I know enough about java to work on modding but still barely know what i'm doing
You can't reference the mixin to get if the moon is visible, but the block class has a method (isMoonVisible I think) to check. You will have to have access to the world to check this. I'm not at my computer right now, I'll be able to help more tomorrow.
yeah i think i'll switch back to the BooleanProperty because the max update limit means on average, half of the tree will not update to the correct texture, defeating the purpose of its "camoflauge"
@fresh salmon I can't figure out how to make a log whilst also using the booleanproperty, and using the mixin causes update limit errors(mentioned above).
well now I've got the axis working but textures are ALL OVER the place
I don't know what was breaking it (decent chance it was the mixin since it was still there but not intended to be used), but I removed the mixin and improved the datagen code a bit. https://github.com/Newtboy/cadens-magic-mod/pull/4
Fixed a lotta stuff but now I can't get the inventory texture to work