baritone icon indicating copy to clipboard operation
baritone copied to clipboard

Add illumination feature to `#sel` commands

Open nbyrd opened this issue 4 years ago • 20 comments

Describe your suggestion

The #sel command should have an "illuminate" option. #sel illuminate would use torches and/or other light-emitting blocks (glowstone, redstone torches, beacons (?), lava (????), etc.) to light up the selected area(s). By default, it should light up every surface area enough to prevent mob spawns; but it should also take an argument to illuminate the area to a selected level.

Examples

#sel illuminate - Light up the selected area with basic torches enough to prevent mob spawns. #sel illuminate 10 - Light up the selected area to a minimum light level of 10. #sel illuminate glowstone - Light up the selected area enough to prevent mobs from spawning using only glowstone blocks. #sel illuminate redstone_torch beacon 3 - Illuminate the area to a light level of at least 3, using only redstone torches and beacons.

Perhaps there could also be a similar command or configuration to remove all light from an area. #sel illuminate 0, perhaps? However, there are already workarounds that can achieve this result (mine torches, replace lava with stone, etc)

Context

It's would be a handy feature for construction projects where you want something to be lit up, either for aesthetic purposes or to guide/restrict the spawning of monsters.

Final checklist

  • [x] I know how to properly use check boxes
  • [x] I have not used any OwO's or UwU's in this issue.

nbyrd avatar Feb 29 '20 21:02 nbyrd

Duplicate of #971, you can use any command in a #sel area

5HT2 avatar Feb 29 '20 21:02 5HT2

I would like to argue that this is separate from #971 and to re-open this issue.

#971 is about having baritone automatically place torches while pathing. #1347 (this issue) is about SELECTING an area to torch up.

One is similar to backfill, which is nice as it keeps mobs from spawning in tunnels while mining for ores. However, the other one is for ACTUALLY lighting up an area that the user may have created before-hand.

Example of #971: -You want diamonds -You don't want mobs spawning in your tunnel -Use #autotorch -Baritone will now place torches as it's mining

Example of #1347 -You're building a mob grinder -There's lots of caves everywhere, where mobs are spawning, and you want to get rid of them all so your mob spawner is more efficient -#sel pos1, #sel pos2, #sel torcharea -Baritone should look for all dark spots / mob-spawnable-spots in the selected area, and path to them, placing torches along the way

Although arguably you can do this with #971, this would require you to path baritone to said dark spots yourself or to use baritone to construct the base first with #autotorch enabled preemptively.

I would VERY much love a mod/plugin/program that could torch my base for me. Having a program that can automatically torch up a base has NEVER BEEN DONE BEFORE. I can't even find a worldedit plugin or script that does this, so this would be absolutely amazing.

SeasonalFerret avatar Nov 08 '20 02:11 SeasonalFerret

As I said, this would be AMAZING. I've been looking for a program that could do this ever since 1.6 (yes, 1.6, not 1.16) came out, and I've never found anything other than a stupid forge mod that places a torch at your foot when you walk over a dark spot, which is stupid.

How this could potentially work: -Search the selection for light level LOWER THAN 8 -Path to closest -Place a torch on that block -Recalculate light level nearby (~10 blocks)

Expected result: -Baritone should run around the surface lighting the area up first, including inside of buildings. PREFERABLY do not break any blocks at first? It would be stupid if baritone broke into the side of my wall just to put a torch there, so have a high block breaking penalty. -Baritone should then path towards cave_air (air that only spawns in caves during world generation- look it up, you can probably use this) and path towards the closest dark spot inside cave_air, then begin the steps all over. Torching the area should be finished when there are no air blocks (cave or otherwise) with a light level less than 8.

It's probably recommended to torch the tunnels baritone digs as well, but I'd assume that it would do this anyway as long as baritone recalculates all of the light levels within the selection one last time when it thinks it's finished?

I know this probably sounds tedious and is probably hell to code baritone to detect light levels, but if done this would be the first ever program to ever auto-torch an area. No plugin can do this, no worldedit script can do this.

We don't need to use glowstone, since random blocks of glowstone laying on the ground would be really off.

SeasonalFerret avatar Nov 08 '20 02:11 SeasonalFerret

I hope I don't sound desperate/impatient, but could I get an opinion from a developer on this #sel torcharea feature?

SeasonalFerret avatar Mar 12 '21 14:03 SeasonalFerret

I see it as being very specific for the amount of time it would take to add to baritone, should anyone like to add it

5HT2 avatar Mar 12 '21 14:03 5HT2

If you want to light up an area with minimal amount of torches the math might get a bit complicated, meaning it's harder to implement a "good" version.

wagyourtail avatar Mar 12 '21 17:03 wagyourtail

If you want to light up an area with minimal amount of torches the math might get a bit complicated, meaning it's harder to implement a "good" version.

A "bad" version that uses up many torches is better than no version.

  1. path to a block with light level 8 (within the selected area)
  2. place torch at your feet
  3. repeat

I would imagine that this would work just fine for many users. If a player is trying to "torch up an entire area", they're bound to have plenty of torches ready for the job. Comparing this method to a person who just spams torches everywhere randomly, this would still not only save torches but also time since baritone would be able to tell where caves are and path to them efficiently while a legit player can not.

Personally, my intended purpose of such a feature would be to fill in caves within a large area in order to make my mob farm more efficient. I could care less if it spams torches everywhere in caves that I will not be going into personally, as long as it covers up all dark spots. It could fill the entire area with pressure plates for all I care- as long as it prevents mobs from spawning in order to increase my mob farm efficiency.

SeasonalFerret avatar Mar 12 '21 18:03 SeasonalFerret

Can't use WorldEdit because I'm not op. Can't use MCEdit because that project died 3 years ago.

I think the best thing I can personally do is to use a world-downloader mod to download the multiplayer world, host a local 1.16.5 server with the downloaded world and connect to it using MC 1.8.9 with via-version with another world downloader (the most popular one requiring you to find a download of java 6, as it does not work on later versions of java), then up in mcedit and run this autotorch script someone happened to have made over six years ago, then remove all blocks except the torches, then convert the final world as a .schematic file, then use litematica to preview the blocks back in the multiplayer world and line them up, then have baritone .build the torch schematic.

That, or take some java classes and learn how to make baritone "walk to nearest dark spot and place a torch". T~T

SeasonalFerret avatar Mar 15 '21 01:03 SeasonalFerret

Duplicate of #863

scorbett123 avatar Apr 22 '22 22:04 scorbett123

@scorbett123 Shouldn't you keep the issue with the most information open? Sure, #863 is older, but this one has actual examples and further information in comments. #863 literally has nothing.

SeasonalFerret avatar Apr 23 '22 03:04 SeasonalFerret

Ok I'll swap it if you insist, however it really doesn't matter.

scorbett123 avatar Apr 23 '22 07:04 scorbett123

its been added?

Sp3rick avatar Aug 14 '22 21:08 Sp3rick

its been added?

This feature hasn't been added yet.

scorbett123 avatar Aug 15 '22 07:08 scorbett123

Just found this while wanting to suggest a rather similar feature... it would be extremely handy if one could make baritone automatically light up a sphere around a given afk spot for mob farms etc. to light up all the caves. I guess thats a bit hard to implement though, since it would involve something similar to the TSP but just in case someone starts working on this, maybe they got a good idea to implement this cheaply too

PlasmaHH avatar Nov 28 '22 12:11 PlasmaHH

I've been wanting a similar feature. What I've done this far is I've used the #thisway 12 and #path commands to get to the next point where a torch needs to be placed, after finishing the row I went to the next point in the new row manually. An illumination feature starting in the corner of a selected area and placing a torch every n amount of blocks would already do wonders.

AlpineBoi avatar Apr 08 '23 12:04 AlpineBoi

shame this feature hasnt been added yet, it would be great for my slime chunks so that i don't have to go through the hassle of lighting up all the caves

ninonook1 avatar Jun 17 '23 04:06 ninonook1