Data Packs Other

Gat Auto-Torch DataPack

  • 12.5k views 0 today
  • save_alt 1k downloads
Compatibility
Minecraft 1.17
to version
Minecraft 1.18
Changes include
  • Advancements
  • Functions
  • Predicates
  • 16
  • 13
  • 9
GatKong
Lvl 70Legendary Technomancer
193
Entirely a vanilla Minecraft datapack for 1.17 & 1.18

The Gat Auto-Torch makes some functions of placing your torches automatic.

Having a torch in the off-hand will automatically place torches when the block_light level becomes 0, which is dark enough to spawn underground mobs. An off-hand torch will begin to smoke at light levels below 8, alerting the player it is dark enough for mobs to spawn under the sky.

Having a torch in the lower-right corner of the inventory will disable the auto-placement feature in case you want to be able to carry torches in your off-hand but don't want them auto-placing all over the place. In this case, instead of placing torches, it will alert the player with an extinguishing sound (pshhh) when you have traveled too far from your nearest torch.

Auto-placement favors placing the torch on a wall to the left of the player, and if there is no viable wall to the player's immediate left, it will place the torch on the floor. Why favor placing torches on the left? So you don't get lost in complex caverns. To find your way back out, simply follow your torches back out keep the wall-placed torches to your right. You will find your way back out easily without getting lost. Left-In, Right-Out! It's better than bread-crumbs, because, you know... birds. Hugging the left wall on your way into darkness will help ensure more left-side torches are getting placed.

In either mode (auto-placement or sound-alert), the player will be warned with a click whenever they travel far enough from the nearest torch to be at risk for mob spawning.

If you enjoy this datapack, please give it some love with diamonds and favorites >^_^<

Be sure to check out some of my other fun packs found here.
-GatPack DataPack, packed full of all kinds of fun enhancements to the vanilla experience.
-GatSilk Silk Touch DataPack, allows picking up spawners and infested blocks.
-CTM Generator DataPack, makes any world into a Complete The Monument world.
-GatPack Texture Pack, makes vanilla Minecraft 3D, animated, and algebraic.

2 Update Logs

Update #2 : by GatKong 11/27/2021 9:51:45 pmNovember 28, 2021 @ 2:51 am UTC

v1.02
-updated pack_format to 8
-added "datapacks installed" advancement tree
-improved position of torch smoke
-updated light predicate to include the range 1 to 15
LOAD MORE LOGS

More like this

  Have something to say?

Maki_Tsuki
08/19/2019 10:02 pm
Level 1 : New Miner
It's a great datapack good for strip mining but it doesn't like if you have a 3x3 as 2 blocks gets to level 7 and none of the torches reach there so every time I past those spots I get the flint and steel sound so I have to move the torches closer. Is there something you can do about it? :)
1
GatKong
08/20/2019 1:17 am
Level 70 : Legendary Technomancer
Unfortunately Minecraft has no hook that datapacks can use for actual light level detection, so the pack uses mathamatics to assess distance between torches. There’s no reasonable way to account for walls between torches when doing parallel mining.
1
Link__HM
06/13/2021 10:54 pm
Level 50 : Grandmaster Strawberry
history
I'm pretty sure there is a predicate you can use to check what light level the block the player is on.
1
GatKong
06/13/2021 10:57 pm
Level 70 : Legendary Technomancer
Funny you should say that! Uploading an updated version of the pack tonight, which uses predicates.
1
Link__HM
06/16/2021 5:06 pm
Level 50 : Grandmaster Strawberry
Oh nice! Good job updating your pack! Your pack is quite cool btw :)
1
Maki_Tsuki
08/20/2019 9:54 am
Level 1 : New Miner
can you decrease the space between the placements so it places a torch after 12 blocks instead of 13? Is it something I can do to change that?
1
GatKong
08/20/2019 11:22 am
Level 70 : Legendary Technomancer
You CAN, it would involve looking at the “area” file that counts blocks between the player and the nearest torch. Delete any line where the x= and z= totals 13. There are hundreds of such lines since the code is testing a three-dimensional 13-block radius around the player.
1
JourneyOver
08/13/2019 11:02 pm
Level 1 : New Miner
What would I need to change in the datapack to make it place torches on the right instead of the left. I much prefer to be right-in, left-out.
2
GatKong
08/14/2019 11:05 pm
Level 70 : Legendary Technomancer
Yes. You would need to rename the four files that place the torch based on how the player is facing... switching east for west and north for south:

z012east.mcfunction rename to z012west.mcfunction
z012west.mcfunction rename to z012east.mcfunction

z012north.mcfunction rename to z012south.mcfunction
z012south.mcfunction rename to z012north.mcfunction

That SHOULD do it. Let me know how this goes for you.

:D
2

Welcome