#Dual Overlays on blocks and entities

1 messages · Page 1 of 1 (latest)

primal onyx
#

Hello, I am creating an addon which has some different sea creatures, such as sea slugs and new tropical fish (inspired by EightSidedSquare). I was wondering if there was any way to stack overlays on top of each other? As in, like how a random tropical fish like, lets say a blue and cyan coloured snooper. I want a code ( or file) that helps me to understand how to make an entity such as a fish, have 2 new colours, like if i want to make a new tropical fish and put options for colours for it like tropical fish has. For the blocks, i also want a similar code to paint a block in an option of 2 colours, (visit EightSidedSquare’s video - Adding way too many fish to minecraft at 7:25 mark). If anyone has a zip file or knows how to explain it to me, please do, I need all the help i can get.

#

i also checked a lot of other addons and pages to find if they had any code i needed. Sadly, no luck. If you do have an addon that has similar code to what i need, please post here

unreal pumice
#

You can also use a separate render controller for the base and the pattern

primal onyx
#

thanks for the help!

primal onyx
unreal pumice
#

You use spawn events to randomize a property in the entity, and then query for that property in the render controller

primal onyx
#

do you know if it also works for blocks?

unreal pumice
#

The same principle should apply for block states and an on_player_placing event, but I'm not sure what the specifics would be as I've never randomized blocks myself

primal onyx
#

if it isnt too much trouble, can you make like a simple code that i can reference off of that is for a tropical fish?

unreal pumice
#

Do you mean for the texture layering? I can probably throw something together for that using like a single cube for geometry. I won't be able to do anything more than that or add any behaviors though

unreal pumice
#

BP file(it randomizes to 4.9 so that there is a chance of the highest value being chosen, as when it converts from the random(a float) to an integer, it just removes the decimal place):

primal onyx
#

was really good explanation! If u want i can include your user in credits

unreal pumice
#

I don't care either way

primal onyx
#

do you know if the code would change to add a third layer?

#

as in, the sea slugs would have a sort of frill around them

#

would the code change or would the code stay the same, like basically i copy one of the render controller layers for the third layer

unreal pumice
#

I don't think so

primal onyx
#

so the code wouldnt change

unreal pumice
#

You would just need a third render controller, and to play around with the order a bit to make sure it's rendering properly

primal onyx
#

ah ok

#

how would an example code for a block look like instead

#

so like i find a type of coral and i break it, i get the item and i place it and its still the same 2 colours

#

also when it generates naturally it chooses colours like the entity above

unreal pumice
#

I'm not sure how you'd do that for blocks to be honest. It might be good to ask that as a separate question in #1067876857103536159

primal onyx
#

alright, thanks

lilac nexus
#

Hi. This thread is precisely what I was looking for, but I am a loss of words and ideas, as the example files you provided don't seem to work, for me at least. I am wondering what else i might have set up differently. Does the world need experiments enabled? (tested both with and without all toggles) What did your manifest files looked like. I've tried on both latest retail version (1.20.51) and preview (1.20.60.26).
The entities can exist in the world, but the spawn egg is a blank item, and the entity itself also does not have any textures. I can't seem to understand how, since I simply downloaded the provided files without editing them at all.

unreal pumice
#

Huh, strange. I was using the latest release without any experimental toggles. It sounds like the resource pack is having issues though. Any content log errors, and did you double check both the BP and rp are enabled in your world? I didn't make them dependant on each other

primal onyx
lilac nexus
lilac nexus
primal onyx
#

bc theres literally no tutorials anywhere except here on how to do that stuff

lilac nexus
#

Oh you meant that. Yeah i am aware. I tried following the bedrock.dev tutorial for layered textures first and that didn't work so i searched here 🙂

primal onyx
#

yeah

primal onyx
#

it would still require the same code right

unreal pumice
#

You could do that

#

Or make an invisible block that summons your entity

#

It should be the same visual wise

primal onyx
#

alr thanks man

primal onyx
#

do i have to add a new file that specifies the hex codes of mentioned colours? Such as concrete_red then the hex code #fa5321 for example.

unreal pumice
#

You shouldn't need to for the overlays. Are you talking about map colors?

primal onyx
#

wait so if i just say like cherry colour then it will be cherry coloured?

unreal pumice
#

Ah. You're best bet would be to make different textures for each color. Like a cherry colored texture, a blue texture. etc.

#

If you really want to, you could use an overlay in the render controller, which is in the format of json "overlay_color": { "r": 1.0,//(0-1, can use molang) "g": 1.0,//(0-1, can use molang) "b": 1.0,//(0-1, can use molang) "a": 1.0//(0-1, can use molang) }