1

Bedrock Texture Pack Question

BitZet's Avatar BitZet5/29/23 10:17 am
1 emeralds 138 3
6/7/2023 11:44 pm
BitZet's Avatar BitZet
Hey, does anyone know how to make bedrock have a probability of texture in mobs for txt packs?
I wanted to add that probability system to my duck texture, if anyone could help me I would appreciate it
Posted by BitZet's Avatar
BitZet
Level 46 : Master uwu
52

Create an account or sign in to comment.

3

2
05/29/2023 2:46 pm
Level 55 : Grandmaster Procrastinator
Lev1ThePanda
Lev1ThePanda's Avatar
1. in the entity file for your duck you want to have a section under the scripts area that is called initialize (check other entity files for reference).
2. add a new variable to it like "variable.variant = math.random_integer(low, high)" you'll want to make the low end 0 and the high end how many textures you have -1 (so count up from 0, if you have 5 textures you would make the high end 4)


3. in the render controller for your duck add a new array and call it "textures" (again see other render controllers for reference). add all of your textures into that array.
4. under the "textures" object in the render controller outside of the array cahnge it from texture.default to "array.textures[variable.variant]"



that should be all there is to it. you could also check my cod to koi texture pack it has the same principle tho it might have a few more steps.



Hope this helps!
2
05/29/2023 2:47 pm
Level 55 : Grandmaster Procrastinator
Lev1ThePanda
Lev1ThePanda's Avatar
also to add more probability to specific textures just add the same texture to the array multiple times to increase it's probability to show up and increase the high end to the variant variable to match the amount of items you have in the array.
1
05/29/2023 6:29 pm
Level 46 : Master uwu
BitZet
BitZet's Avatar
I'll see if I can do it, thank you very much dude!:]
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome