Started by
BlazingGreenFire
on
Topic category: Help with Minecraft modding (Java Edition)
Hello so I am remaking the copper golem in Minecraft, and I wanna figure out how to make it so if the copper golem is out in the open if it is thundering, it has a 70% chance of getting struck by lightning. Any help?
entity tick update
if is thundering in the provided world
do if random 0, 1 <= 0.7
do strike lightning at x y z
Search before posting
Hello so I just did that, and it worked... a little too well.... lightning was being spammed on the entity, do you know how to fix that
also the lightning damages it
then check the checkbox Effect Only
and change 0.7 to 0.5
delete all and put this:
if is thundering in the provided world
do if random 0, 1 <= 0.5
do wait 100 ticks on server side and do Striker Lightning at X Y Z effect only
that happened after I did that till I made it stop thundering
also after 100 ticks have past it then continues to forever strike lightning
show me your procedure
3 errors.
First. on your Entity put the procedure on Update Tick. and don't put anything on Global Triggers
Second. it is <= not < (< but with a line under it)
Third. don't specify the entity, just put the Wait block on random 0 , 1
I changed all the things but now like before, after 100 ticks pass, lightning is just spammed on the copper golem. I want any lightning that strikes nearby to strike him instead, not to generate new ones also
then use NBT Number Tags
remove the wait button. and instead put this: Set NBT Number Tag Timer of entity to Get NBT Number Tag Timer + 1
and then: if NBT Number Tag Timer of entity = 100
do strike lightning at X Y Z
inside Random 0, 1 <= 0.5
if not even that works, you could try setting the 0.5 even lower.
where do I get the "Set NBT Number Tag Timer of entity" thing cuz the search doesn't work that well and I can't find it