#i was trying to make slimes spawn bigger, but when killed they still spawning big,
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
You are using a tick function to change all slimes size, right?
in short words
yes
Do you want variety with spawned slime sizes?
yes pls
like size 15-24
version (1.20.1)
Well i dont know if slimes carry over all nbt data after splitting or just the custom name
But if they do, you can just check for slime sizes 0-2 and change it to your desired ones and tag that slime so it wont be selected again
@valid summit there is a way to just modify the size once?
yes, when you change the size, also add a tag to the slime, and only change the size of slimes that don't already have that tag
but how do i add that tag to the slimes that got killed?
i'm fairly certain tags are carried over when the slime splits (as kq already mentioned) so that takes care of itself
like this ?
execute as @e[type=ghast,tag=!modified] run data merge entity @s {Size:20}
tag @e[type=ghast] add modified
generally it'll be better to do something like execute as @e[tag=!modified] run function ns:modify where ns:modify looks like:
tag @s add modified```
but that's the basic idea, yes. though i assume you didnt mean to have ghasts as your target there now
looks good. does it work?
i will try
give me a minute
well, it works because the slimes are spawning in size 20, but when killed, they split into 2 slimes with the same size, and they are supposed get smaller after killed
ouch. that means slimes dont carry nbt sadly
so, what can i do?
<@&1166082198152159386> <@&1202694677766348840>
Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)
Which slimes should spawn bigger? naturally spawning slimes?
They actually do carry on their parent nbt. something else is going on here.
@oak plank the provided solution to tag the slimes should work.
Tick function should look like:
execute as @e[type=slime,tag=!ns.modified] run ns:function
where this function would perform the following:
data modify entity @s Size set value <your_number>
followed by:
tag @s add ns.modified
Slimes that are killed should retain the tags of their "parent" I used ns.modified here to avoid conflicts with other datapacks you can also pick a more simple name.
in short, if a slime does not have your tag, grow it and grant it the tag.
okay
wait
a size 15 slime will split into size 7 which will split into size 3 (vanilla large slime)
if you don't want to change the way the slime splits, just its size, you would need attributes
how i do that?
what attributes i need
do you actually want this?
normal slimes go:
3 to 1 to 0
15 to 7 to 3 to 1 to 0 is what you get if you change the Size of a slime
do you want to grow all slimes or only bigger slimes?
is exactly what i want
you want them to split 5 times? then you dont need attributes
i want 15-7-3-1
small slime = 0
but all of them spawning with size 15
1 is medium
but when killed i want them to split into smaller slimes
but when i kill them, they split into 2 slimes with size 15
even after did what you said
that is highly unlikely, have you checked the output for any issues and done a reload after making the changes?
also, which version are you on? please share your functions in full if you can
of course
my version is (1.20.1)
tick.mcfunction
alright my hunch is that this is not documented properly on the minecraft wiki. The correct behavior for the slimes retaining tags was added somewhere in 1.21 but the wiki does not list the exact java version (it does list a bedrock 1.21 version)
damm
i was testing in 1.21.5
well, there is a way to make what i want in 1.20.1?
without being able to use the tags it is definitely harder to do
as I can imagine you dont want it to matter who or what killed the slime
in which case a tag would've been very convenient
correct
so we are not able to add a tag to the slime?
you can but if it is not retained it wont matter
if the game doesn't do it for you, no there is not
you can't distinguish naturally spawned and spawned from killed slimes
Depends, it could be that some other things are retained, a custom_name from a nametag for instance.
I am booting up 1.20.1 to see what I can find
I will first try the method with the tags, just in case it does work and I missed something.
okay
did you try with the custom name?
great
it is probably not that good for performance
it also allows cheating it by renaming a small slime
which would then grow to size 15 again 😄
JAJAJJAJAJAJA lol
but it´s okay
it is better than nothing
but how do i add the custom name to make that?
well i know how
but just adding it next to data modify entity @s Size set value 15?
example:
data modify entity @s CustomName set value '{"text":"Slime"}'
Filtering would be:
execute as @e[type=minecraft:slime,name=!Slime] ...
in this case the name of the slimes is Slime
You can make the name look a lot fancier using text component tools but I am not sure how the selector would resolve it
wait.... im having some trouble lol
the execute as is doing some weird stuff
you can do name=! without a name behind it to select a nameless slime
this way renaming won't do anything either
nevermind
what happened?
above selector is fine, I am not sure what I just did lol
so you do !<your_name>
colors are ignored
so you can do fancy colors in the slime name
make it green or rainbow colored
remove the tag, you wont need it unless you update your pack to 1.21 and can use the tag
yes this should work
done
you can make the name green like:
data modify entity @s CustomName set value '{"text":"Slime","color":"green"}'
this does not change or break the other stuff
hmmm
i think it is because of this
I see, it is not updating the custom name
strange
I have the same issue now, but I can't tell why exactly
It could be that the function run as the slime can't modify the name of the slime