This datapack adds a multiblock structure to Minecraft which eliminates the need for torch-spam to get rid of those annoying zombies and was made at the request of dio_brando. The Megatorch functions similarly to the Magnum Torch from Extra Utilities in that it has no effect on mobs that spawn outside its range while preventing mobs from spawning inside its area-of-effect (see spoiler for visuals of active Megatorch). The multiblock itself is a 3x3x3 structure made up of Smooth Stone, Cobblestone Stairs, Glowstone, Light Gray Stained Glass, and an Iron Block and has an effective range of 64 blocks from the center.
Multiblock Details:
To form the multiblock, build the structure shown in the below spoiler and throw a diamond onto the glowstone block in the center. You will be able to tell that the multiblock has formed when the glowstone block begins emitting white particle effects. To remove the structure, simply break any part of the structure (this includes placing a block in any of the open air spaces).
The Meaning of Life, the Universe, and Everything.
Join Date:
1/7/2019
Posts:
56
Minecraft:
JohnTempest
Member Details
So basically, the way the system works is that it assigns each mob a tag upon spawning that is replaced after one game tick, for passive mobs like salmon, pigs, and horses, this tag is new_passive_mob. The command that eliminates the hostile mobs is as follows:
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run execute at @e[type=!elder_guardian,type=!evoker,type=!guardian,type=!shulker,type=!silverfish,type=!vex,type=!vindicator,tag=new_hostile_mob,distance=..64] run particle minecraft:enchanted_hit ~ ~1 ~ 0.25 1 0.25 0 10 force
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run teleport @e[type=!elder_guardian,type=!evoker,type=!guardian,type=!shulker,type=!silverfish,type=!vex,type=!vindicator,tag=new_hostile_mob,distance=..64] ~ -100 ~
If you want the system to also target salmon, pigs, and horses, you basically want to copy these two lines and replace
If I do something like this would it work, as I could not figure out what to do from above.
# Megatorch Effects
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run particle minecraft:effect ~ ~0.1 ~ ~ ~-10 ~ 0 0 force
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run execute at @e[type=!elder_guardian,type=!evoker,type=!guardian,type=!shulker,type=!silverfish,type=!vex,type=!vindicator,tag=new_hostile_mob,distance=..64] run particle minecraft:enchanted_hit ~ ~1 ~ 0.25 1 0.25 0 10 force
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run teleport @e[type=!elder_guardian,type=!evoker,type=!guardian,type=!shulker,type=!silverfish,type=!vex,type=!vindicator,tag=new_hostile_mob,distance=..64] ~ -100 ~
# My added
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run execute at @e[type=salmon,tag=new_passive_mob,distance=..64] run particle minecraft:enchanted_hit ~ ~1 ~ 0.25 1 0.25 0 10 force
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run teleport @e[type=salmon,tag=new_passive_mob,distance=..64]~ -100 ~
#############################################################
The Meaning of Life, the Universe, and Everything.
Join Date:
1/7/2019
Posts:
56
Minecraft:
JohnTempest
Member Details
If you see =! it's because that code is not meant to affect those entities, you want the opposite which is why you just want the equals sign
As for the code [type=salmon,type=bat,etc...], for each entity, you will need a new line because Minecraft will interpret that you only want to affect an entity that is a salmon, bat, and cow. Since that's impossible, the code will just fail.
I'm glad I found this as I don't like to torch spam in single player and I like to have dark, spawn-proof areas.
I thought I would mention that this didn't work for me in 1.16.1, but I tweaked it a little and it seems to work for me so far. The problem arose because Zombie Pigmen are no longer a thing and it caused the datapack to throw an error into the log since it tries to tag an invalid entity. I don't understand enough about minecraft mods/datapacks, but this caused its main function to fail on all mobs, not just cause an error on the old Pigmen. The multi-block functionality worked and created the armorstand/barrier/particle effect/etc, but no tags were being applied to mobs that spawned within its radius.
I edited mob_tagging.mcfunction by removing Zombie Pigmen and adding Piglins, Zoglins, and Hoglins to the hostile list. It seems to work for me so far!
Just thought I would mention it, in case this datapack could be updated for everyone, assuming it's still relevant and I didn't miss a newer/better version online somewhere.
Oi my man, I know it's been a while since this post, but can you make it work in 1.17? The glowstone block keeps disappearing, I already did the thing to make it work in 1.16 but 1.17 is bugging
dio_brando
Requirements:
Required By:
Details:
This datapack adds a multiblock structure to Minecraft which eliminates the need for torch-spam to get rid of those annoying zombies and was made at the request of dio_brando. The Megatorch functions similarly to the Magnum Torch from Extra Utilities in that it has no effect on mobs that spawn outside its range while preventing mobs from spawning inside its area-of-effect (see spoiler for visuals of active Megatorch). The multiblock itself is a 3x3x3 structure made up of Smooth Stone, Cobblestone Stairs, Glowstone, Light Gray Stained Glass, and an Iron Block and has an effective range of 64 blocks from the center.
Multiblock Details:
To form the multiblock, build the structure shown in the below spoiler and throw a diamond onto the glowstone block in the center. You will be able to tell that the multiblock has formed when the glowstone block begins emitting white particle effects. To remove the structure, simply break any part of the structure (this includes placing a block in any of the open air spaces).
Step One:
Download the MFF Pack extract the zip file.
Step Two:
Navigate to the game file you wish to install the MFF Pack into and select Edit.
Step Three:
Select Open World Folder
Step Four:
Open your datapacks folder.
Step Five:
Paste the extracted file into your datapacks folder.
You are now done and your MFF Pack should now be installed!
is this 64 blocks in the x y z.
ie. If placed next to cave system, said caves will be lit up to 64 blocks or just L.O.S will be lit?
Yes, the range of effect is 64 blocks in all directions forming a cubic area of effect.
That said, the system does not actually add light to caves, it merely eliminates all mobs that try to spawn within its area of effect.
Hope this clarifies things!
So it Stops mobs spawning in a box 128 by 128 by 128 if the source is at the center?
Also will spawners still work as they should if in range of the Multiblock
Correct, it stops all mob spawning, including from spawners within a 128x128x128 space
Last question. What about passive mobs???? squids golums and such.
Not affected whatsoever!
Though with some setting changes, it is possible to disable their spawning too.
Me again
What would I have to add/change in the pack to say make salmon, pigs or horses not spawn with this.
So basically, the way the system works is that it assigns each mob a tag upon spawning that is replaced after one game tick, for passive mobs like salmon, pigs, and horses, this tag is new_passive_mob. The command that eliminates the hostile mobs is as follows:
If you want the system to also target salmon, pigs, and horses, you basically want to copy these two lines and replace
with the following parameters
and repeat for each mob that you'd like to prevent from spawning.
That's basically a long way of saying that you just want to change the targeting to the appropriate mob type and tag.
The tagging information can be found under mob_tagging.mcfunction.
Let me know if you have any other questions!
- John
Sorry for late post.
If I do something like this would it work, as I could not figure out what to do from above.
Yup, however on the last line, there is a space missing before the coordinates.
Fixed Version:
execute at @e[type=minecraft:armor_stand,tag=Megatorch] run teleport @e[type=salmon,tag=new_passive_mob,distance=..64] ~ -100 ~
and if i wanted to add bats, cows and other passive mobs, would I do.
@e[type=salmon,type=bat,type=cow and so on
also why do the hostile mobs have a " ! " at the start of the name and not the passive mobs ?
P.S. I've now got two whitelisted severs to add this datapack.
If you see =! it's because that code is not meant to affect those entities, you want the opposite which is why you just want the equals sign
As for the code [type=salmon,type=bat,etc...], for each entity, you will need a new line because Minecraft will interpret that you only want to affect an entity that is a salmon, bat, and cow. Since that's impossible, the code will just fail.
Hope that makes sense
-John
Ty for this great DP. Looking forward to all new updates.
Will you be doing a 1.14 update????
I don't believe any of the code should be affected by the 1.14 update, so theoretically, this system should still work if you upgrade
TLDR; 1.16.1 Possible Fix Described
I'm glad I found this as I don't like to torch spam in single player and I like to have dark, spawn-proof areas.
I thought I would mention that this didn't work for me in 1.16.1, but I tweaked it a little and it seems to work for me so far. The problem arose because Zombie Pigmen are no longer a thing and it caused the datapack to throw an error into the log since it tries to tag an invalid entity. I don't understand enough about minecraft mods/datapacks, but this caused its main function to fail on all mobs, not just cause an error on the old Pigmen. The multi-block functionality worked and created the armorstand/barrier/particle effect/etc, but no tags were being applied to mobs that spawned within its radius.
I edited mob_tagging.mcfunction by removing Zombie Pigmen and adding Piglins, Zoglins, and Hoglins to the hostile list. It seems to work for me so far!
Just thought I would mention it, in case this datapack could be updated for everyone, assuming it's still relevant and I didn't miss a newer/better version online somewhere.
Thank you for creating this cool datapack!
Oi my man, I know it's been a while since this post, but can you make it work in 1.17? The glowstone block keeps disappearing, I already did the thing to make it work in 1.16 but 1.17 is bugging