#Aquarium (looking for help to code a custom block)
1 messages · Page 1 of 1 (latest)
This "block" is made of two parts the fish tank part (alpha test) and the water and the glass (blend)
This allows me to use 2 different render methods on a same block, and it also allows me to make it good looking for rtx players
My idea with this block is to make it a double block, so if u place one part the other one generates instantly
Just a basic horizontal double block
But I also wanted to make it functional
Interacting with a tropical fish bucket would spawn a custom entity with an animation of a fish being in the aquarium
Sorry if I wasn't clear my English is not that good
You explained it great
Thanks
So you need it stable or want to use custom components the time they get into stable?
I want it to be code with script, so it doesn't get deprecated with future updates
Okay. This is the logic you are aiming for:
- onPlace custom component > check for the block to the side of your block based on rotation > if air, place the second part of your block, otherwise cancel the event
- onInteract custom component > check if the player has a fish in their hand > change block state/texture to show the fish in your blocks > remove 1 item
This requires scripting. There are a few templates with a similar logic in my repohttps://github.com/Kaioga5/Kaioga-s-Block-Templates
Give them a look and feel free to use them to start with. Each file is properly documented
Thanks this is gonna be very useful 
I was looking into your templates and I wanted to know if the plank template had different destruction times for vanilla tools