Started by
TheHylian
on
Topic category: Help with Minecraft modding (Java Edition)
I'm making a mod that in part contains a poison gas vent. This vent, when redstone activated, should damage all entities withing a 16 block radius of it. I attempted to use procedures for this, but I'm not sure how exactly to set up the XYZ and world dependencies for it. How can I anchor the block's position to the AoE?
Edited by TheHylian on Fri, 04/10/2020 - 19:42
You could use commands to reach entites in radious.
Can someone give an example of the code blocks for this?
An example sure, with code blocks no.
That gives an iterable list of mobs within 20 blocks. Not radius though.
Do I copy this and post it into a command code block?
That is a java code that can be put in a class. But it won't do anything without an iteration.
Now that custom snippets are back;
use a World management code block "Execute "command" at x y z"
in the command text field enter something like "/effect @e[r=16] minecraft:instant_damage 1 5", this gives all entities within radius 16 blocks 5x instant damage effect for 1 second
This is how I did it in 1.15.2
/effect give @e[distance=..2] minecraft:instant_damage 1 1