Topic category: User side tutorials
I see that there are not any tutorials here in this forum section, most are topics asking help. I will try to make some tutorials of how to do things, and doing them properly. Here is my first tutorial.
Have you ever thought that creating a zombie that burns at day with a procedure was simple? I thought also that but I see I were wrong?
This tutorial will aim to be simple and have the best results as possible inside that simplicity. (This tutorial will only teach you how to do the zombie update tick procedure)
Obviously, the first thing we have to do is checking if the zombie it's actually on the surface or at least can see the sky. Let's do it:
After that, we should check if it's actually daytime and if it's not raining or thundering. Let's put the corresponding blocks:
To make external inputs, rightclick on an block like "and" and then click external inputs.
We need also to check if the zombie isn't in water. We need 4 checkings, 2 for flowing water and 2 for still water. Each one for the above half and below half of the zombie.
Also we need to check if the entity is actually burning, because if we don't check that, the fire will resetted and the zombie will get damage faster. (When the mob starts to ingnite, it automatically gets a first damage, so if it resets constantly, it will get damage constantly)
Then also we need to check if the provided world is not remote. If you don't put that, you can get errors such as the zombe getting ignited at night, but doesn't taking any fire damage, etc.
Then set the provided entity on fire to 5 seconds, you can change those seconds if you want, 5 works fine for me at least.
Then, return to the can see the sky condition, and place inside it, just after the day and rain conditions, the following conditions. First check if it's raining or thundering. Then if it's not the provided world remote and finally, extinguish the entity. Just like the image:
So, the result will be something like the following image:
Hope this helps anyone, I know this code can be better, but it should work as a base.
Anyways, thank you very much for reading and see you in the next tutorial or thing. Bye!