Originally designed as a config option for my AutoSlabs mod, I think I will release this as a standalone mod (once I patch custom replacement placements like snow layers) Done! I didn't need to do anything besides utilize ItemPlacementContext's canPlace() and canReplaceExisting(). Now the only thing left is to get multiblocks like doors and beds working
#Custom Block Placing Preview
80 messages · Page 1 of 1 (latest)
That is so cool
Thanks!
Are you going to make the fences preview show the part that gets added on the neighboring fence
Maybe. The game doesn't know that the fence wireframe is there at all, so I'd have to do some trickery to fake render them
Ya
are you going to keep the vanilla outline around the targeted block? i feel like you probably don't need it when the preview wireframe is already rendering
I'll make it a config option
Is this client sided by chance? Would be super epic if it was
yep!
This mod works with any mod that changes block outlines too. Here it is with https://modrinth.com/mod/seamless
You're pushing out some cracking mods recently! 🤯
Thank you!
I recognize your name from somewhere
Uh, I've been developing mods for a little while now, you can search from: andrew6rant in:showcase-old has:file and from: andrew6rant in:showcase has:file to see some of what I've made
I also was a tweak developer in the iOS jailbreaking community a few years ago if that's what you remember
No it was from mods
Oh! Just looked through your Modrinth page. I made the deep underground lava fix mod that you forked
Aha
I was actually just about to patch it for 1.19.2
Thats what it was yeah
Missed notifications from that repo for some reason didn't know it was broken on that version
Btw your fix makes bedrock visible in some caves
Wait, really?
yooo this is awesome!
you make such cool mods
i am making seamless so the shape only extends when the other blocks really are there though, so after that update this won't work anymore unless the other half of the bed is there already
Ooh, nice! Did you manage to find a way to not hardcode the seamless outlines?
yeah it will be data driven
you can add rules which specify what blocks with what blockstates combine in specified directions
and then when rendering it will recursively find blocks to connect
you could for example make all iron blocks connect
although it does this every frame, its is much faster than you would think
Very cool. I was trying to hook into the block placement/ neighbor check to see if another block was placed from the initial block (doors, beds, tall flowers, etc) and then merge the outline voxelshapes, but it hasn't worked out exactly
yeah that would be difficult, i would imagine different blocks handle that differently too
Yeah
i guess for the vanilla blocks you could hardcode it too
Yep thats why i released my version of the mod
Yeah, since you're changing your outline method, you mind if I yoink some of your voxelshapes (bed, door, tall flower) I don't need things like pistons since you can't place both sides at once. My project is also under MIT and I'll credit in the code
yeah no problem, i made rotation methods to make it easier
The rotation should be handled by my placement code, I think all I need to do is override the actual voxelshape
well you still need to specify the shape for every state right?
Ah, that's true
I was thinking of the tall flowers which don't need rotation like doors and beds lol
ah
color customization! now instead of not showing, you can have the option of showing an "invalid" render
also I'm building a very simple API for mods to use to make their own custom preview render
does this work for beds if you place them inside another block too?
and other 2 block blocks of course
nice
only problem is that since the getPlacementState is null, I don't know the state, lol. I just set the default
that is partially why I am making an API
ah
how would it work?
Instead of just using the bedblock's placement code, I could run custom fake placement code that'll basically just return the proper bed bottom state
because right now the bed returns null if the top block is invalid
Potentially like Minecraft Classic there could be a toggle to instead render a transparent model of what your placing instead of the outline?
That would be very cool
I’ll try find a picture
While I would like to have a translucent block render overlay, it is more difficult than it looks (transparancy ordering is hard haha)
This is my last attempt at it, as you can see it went disastrously
I hate it when my black vertical slabs go all over the place
lol
I had that exact problem many times but in reverse, mine was 16 times too small, yours 16 times too big
Gotta remember the difference between Block.box and Shapes.box xD
Block.createCuboidShape
Ah
and VoxelShapes.cuboid
This is pretty sick
This is absolutely comedic to me 
Trying to figure out how to nicely implement an API that allows other mods to mess with the crosshair rendering. Here's something simple I built for AutoSlabs' new keybind system (textures are WIP)
Oooooh
ngl i kinda like those little preview textures, if those are wip then what would be your goal plan?
right now they are hardcoded based on AutoSlab's slab lock keybind (this is a part of AutoSlabs and not this mod, don't worry). I'm currently working on a way to make them data-driven
ah i see
(any update on this)