#Aquarium (looking for help to code a custom block)

1 messages · Page 1 of 1 (latest)

final thicket
#

So I'm looking someone who can help me to code this block, I have some code knowledge but with the old Holliday creator features, but I wanted to make this a stable addon

#

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

stuck grove
#

You explained it great

final thicket
stuck grove
#

So you need it stable or want to use custom components the time they get into stable?

final thicket
stuck grove
#

Okay. This is the logic you are aiming for:

  1. 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
  2. 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

GitHub

Contribute to Kaioga5/Kaioga-s-Block-Templates development by creating an account on GitHub.

#

Give them a look and feel free to use them to start with. Each file is properly documented

final thicket
final thicket