Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ run/

# Gradle stuff
.gradle
build
build
/Bucket_Mobs_Resource_Pack/
165 changes: 110 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,89 +2,144 @@

[![wakatime](https://wakatime.com/badge/user/1f3b44b5-611a-484d-bcdc-b2084eefec1a/project/2a7588f5-f1d8-4dae-aa7b-fea0bf437f78.svg)](https://wakatime.com/@1f3b44b5-611a-484d-bcdc-b2084eefec1a/projects/szguvxhtkl)

Throw mobs into buckets! :D
Throw mobs into buckets - like axolotls, but for everything else.

## Permissions
| Permission | What it do | Default |
|---------------------------------|--------------------------------------------------|---------|
| `simplebucketmobs.bucket.<mob>` | Allows the user to bucket the specified mob | `false` |
| `simplebucketmobs.bucket.all` | Allows the user to bucket all enabled mobs | `op` |
| `simplebucketmobs.reload` | Reload plugin configuration files | `op` |
| `simplebucketmobs.debucket` | Dump saved mob NBT data from Mob Bucket to chat. | `op` |
Right-click a mob with an empty bucket to capture it. Right-click a block to release it.

## Commands

| Command | Description | Permission |
|---|---|---|
| `/sbm reload` | Reload all configuration files | `simplebucketmobs.reload` |
| `/sbm debucket` | Print NBT debug info for the bucket mob in your hand | `simplebucketmobs.debucket` |

## Texture Configuration
Aliases: `/simplebucketmobs`, `/simplebucketmob`

## Permissions

This configuration is `texture.yml` which is specifically used for custom model data. Currently, the custom model data is applied to a bucket.
| Permission | Description | Default |
|---|---|---|
| `simplebucketmobs.bucket.<mob>` | Bucket a specific mob type (e.g. `simplebucketmobs.bucket.sheep`) | `false` |
| `simplebucketmobs.bucket.all` | Bucket all enabled mob types | `op` |
| `simplebucketmobs.reload` | Reload configuration files | `op` |
| `simplebucketmobs.debucket` | Dump saved mob data to chat | `op` |

The texture configuration is made to be customizable in the event you wanted to make special textures for each variant of a mob.
Per-mob permissions are only checked when `requires-permission: true` is set for that mob in `config.yml`.

For example, if you wanted to set a special blue sheep texture, rather than just having a generic texture for all sheep.
## Configuration (`config.yml`)

### Using "default"
### Captured Item Style

The simplest way to assign custom model data is to use the default option.
Controls the appearance of the bucket item produced when a mob is captured.

```yaml
SHEEP:
default: 1
PIG:
default: 2
captured-item-style:
use-resource-pack: true # Apply item-model from texture.yml (requires a resource pack)
default:
item-type: BUCKET # Material of the bucket item
item-model: "minecraft:bucket" # Fallback item model (NamespacedKey)
name: "<aqua><display_name> in a Bucket" # MiniMessage display name
lore:
- "<gray>A <type_name_cased> sits in the bucket</gray>"
enchantment-glint: true # Whether the item has an enchantment glint
```

This is the easiest way to set it and will set it to all mobs of that type.
In the above example, all sheep will have custom model data 1 and all pigs will have custom model data 2.
**Name placeholders:**

### Using the nbtKey and nbtValue
| Placeholder | Example output |
|---|---|
| `<type>` | `SHEEP` |
| `<type_name_cased>` | `Sheep` |
| `<display_name>` | Custom name if set, otherwise the mob's default display name |

nbtKey and nbtValue are the ways I will be referring to the NBT Tags. nbtValue is our "goal". The examples are simplified by removing the extra JSON.
### Mob Rules (`bucket-type-settings`)

Consider a villager's profession...
Controls which mobs can be bucketed and under what conditions.

```json
{ "VillagerData": {"level":1, "profession":"minecraft:none", "type":"minecraft:desert"} }
```yaml
bucket-type-settings:
default:
allow: false
sneak-required: false
pickup-when-aggro: false
requires-permission: false
types:
SHEEP:
allow: true
VILLAGER:
allow: true
sneak-required: true # Player must be sneaking to bucket this mob
requires-permission: true # Checks simplebucketmobs.bucket.villager
SLIME:
allow: true
pickup-when-aggro: true # Can be bucketed even when targeting the player
```

If we want to differentiate custom model data based on a villager's profession, our nbtValue will be "minecraft:none" in this example.
Valid entity type names follow the [Bukkit EntityType enum](https://purpurmc.org/javadoc/org/bukkit/entity/EntityType.html). The following are always blocked regardless of config, since they are already bucketable in vanilla: `TROPICAL_FISH`, `SALMON`, `COD`, `AXOLOTL`, `PUFFERFISH`, `TADPOLE`.

## Texture Configuration (`texture.yml`)

`texture.yml` maps mob types (and their variants) to item model keys. These keys are [NamespacedKeys](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/NamespacedKey.html) pointing to models in your resource pack. `use-resource-pack` in `config.yml` must be `true` for these to apply.

The default values reference the [Bucket Mobs Resources](https://modrinth.com/resourcepack/bucket-mobs-resources/versions) resource pack.

You would get to the nbtValue using all the nbtKeys along the way. This will look like this in your `texture.yml`...
### Basic format

Every mob entry supports a `default` key used as the fallback when no variant matches:

```yaml
VILLAGER:
VillagerData:
profession:
"minecraft:none": 1
blaze:
default: "simplexity:bucket_mobs/misc/blaze"
```

As shown above, you can use any information stored in the NBT tags to differentiate specific variants of a mob. Here are a few more examples...
### Variant format

**Parrot (Variant)**
For mobs whose variant is recognized by the plugin (see table below), sub-keys under `type` are matched against the variant name:

```json
{ "Variant": 1 }
```
```yaml
PARROT:
default: 0
Variant:
1: 1
frog:
default: "simplexity:bucket_mobs/frog/cold"
type:
cold: "simplexity:bucket_mobs/frog/cold"
temperate: "simplexity:bucket_mobs/frog/temperate"
warm: "simplexity:bucket_mobs/frog/warm"
```

**Sheep (Color)**
### Supported variant lookups

| Mob | `type` key format | Example keys |
|---|---|---|
| Cat | `Cat.Type` enum, lowercase | `tabby`, `black`, `red`, `siamese`, `british_shorthair`, `calico`, `persian`, `ragdoll`, `white`, `jellie`, `all_black` |
| Fox | `Fox.Type` enum, lowercase | `red`, `snow` |
| Frog | `Frog.Variant` enum, lowercase | `cold`, `temperate`, `warm` |
| Horse | `<color>_<style>`, both lowercase | `brown_none`, `white_white_stockings`, `black_white_field`, etc. |
| Llama | `Llama.Color` enum, lowercase | `creamy`, `white`, `brown`, `gray` |
| Mooshroom | `MushroomCow.Variant` enum, lowercase | `red`, `brown` |
| Parrot | `Parrot.Variant` enum, lowercase | `red`, `blue`, `green`, `cyan`, `gray` |
| Rabbit | `Rabbit.Type` enum, lowercase | `brown`, `white`, `black`, `black_and_white`, `gold`, `salt_and_pepper`, `the_killer_bunny` |
| Sheep | `DyeColor` enum, lowercase | `white`, `orange`, `black`, `red`, etc. |
| Shulker | `DyeColor` enum, lowercase | `white`, `orange`, `black`, `red`, etc. |
| Trader Llama | `Llama.Color` enum, lowercase | `creamy`, `white`, `brown`, `gray` |
| Villager | `Villager.Profession` enum, lowercase | `none`, `farmer`, `librarian`, `cleric`, etc. |
| Wolf | `Wolf.Variant` enum, lowercase | `pale`, `ashen`, `black`, `chestnut`, `rusty`, `snowy`, `spotted`, `striped`, `woods` |

All other mobs use only `default`.

### Horse key format

Horse keys combine color and marking style separated by an underscore:

```json
{ "Color": "2b" }
```
```yaml
SHEEP:
default: 0
Color:
0b: 0
1b: 1
2b: 2
horse:
type:
brown_none: "simplexity:bucket_mobs/horse/brown_default"
brown_white_stockings: "simplexity:bucket_mobs/horse/brown_white_stockings_and_blaze"
brown_white_field: "simplexity:bucket_mobs/horse/brown_white_field"
```

> **Note**
>
> You can only use one set of nbtValues (in the villager example, profession).
>
> The method used to search for the desired nbtValue is not recursive and will not find all possible values.
Valid colors: `white`, `creamy`, `chestnut`, `brown`, `black`, `gray`, `dark_brown`
Valid styles: `none`, `white`, `whitefield`, `white_stockings`, `dots`, `black_dots`

## Locale (`locale.yml`)

All player-facing messages are defined in `locale.yml` using [MiniMessage](https://docs.advntr.dev/minimessage/format.html) syntax. Edit the values there to change any message text without recompiling.
39 changes: 0 additions & 39 deletions build.gradle.kts

This file was deleted.

7 changes: 0 additions & 7 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading