#custom log texture error (1.21.0)

44 messages · Page 1 of 1 (latest)

stark cairn
#

same as title, this makes no sense. Apparently I'm missing files but it refuses to work even with vanilla blocks in the JSON

#

i'll leave this if it helps

fresh salmon
#

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

stark cairn
#

yoop i'm here let me look at it

stark cairn
#

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

fresh salmon
#

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

stark cairn
#

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

stark cairn
#

@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

fresh salmon
#

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

stark cairn
#

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.

stark cairn
#

@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.

stark cairn
#

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

stark cairn
#

@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.

fresh salmon
#

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.

stark cairn
#

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

fresh salmon
stark cairn
#

@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

fresh salmon
#

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.

stark cairn
#

decoration ticks? Also now the moon oak leaves (uses moon visible) are textureless

fresh salmon
stark cairn
#

So what led to the leaves suddenly forgetting their textures?

fresh salmon
stark cairn
#

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

fresh salmon
#

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.

stark cairn
#

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"

stark cairn
#

@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

fresh salmon
stark cairn
#

Fixed a lotta stuff but now I can't get the inventory texture to work