cabaletta / cabaletta/baritone

Command "#set add" to add an item to a list in settings

Open
#2,306 10 comments 6 reactions 0 assignees View on GitHub
acepted enhancement
Dominant language
Java
Stars
9.2k
Forks
2.1k
Avg merge
4d 3h
Merged PRs (30d)
3

Description

## Describe your suggestion
> With as much detail as possible, describe what your suggestion would do for Baritone.

New commands : `#set add`, `#set remove`, `#set clear`.

Those commands would serve to add or remove items in a list in the settings.

### Examples

```
#set remove acceptableThrowawayItems stone
```

```
#set add acceptableThrowawayItems andesite,diorite,granite
```

## Settings
> If applicable, what settings/customizability should be offered to tweak the functionality of your suggestion.

## Context
> Describe how your suggestion would improve Baritone, or the reason behind it being added.

In [USAGE.md](https://github.com/cabaletta/baritone/blob/master/USAGE.md#commands), `acceptableThrowawayItems` is listed as a setting that's "*fun / interesting / important that you might want to look at changing in normal usage of Baritone*".

However, during "normal usage of Baritone", using `#acceptableThrowawayItems dirt,cobblestone,netherrack` is a bit clunky if you want to add or modify your list.

Even in abnormal usage while editing `settings.txt`, it looks like this :

```properties
acceptableThrowawayItems Optional[ResourceKey[minecraft:item / minecraft:dirt]],Optional[ResourceKey[minecraft:item / minecraft:cobblestone]],Optional[ResourceKey[minecraft:item / minecraft:netherrack]]
```

Off-topic
I'd suggest using JSON or YAML to store settings. No, seriously, I mean it. It's so much easier for both developers and users to work with an established standard rather than trying to parse programmatically or mentally a format that no one else ever uses.

The problem is that there's no way to add/modify a list, only to override it. And copying old values has to be done manually, which is tedious if there's many, many items in that list. I think a command to add/remove items from a list in the settings would be very appropriate. This way, during normal usage of Baritone, one could add/remove an item from the list without having to copy everything.

## 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.