Skip to content

About

Andreaitemmaker: Vibe coded item plugin aiming to replace premium plugins by being completely free and open source

Resources

Security policy

Stars

1 star

Watchers

1 watching

Forks

Latest commit

ย 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก Andreaitemmaker

Custom items, weapons, armor, blocks and furniture from plain YAML โ€” with the resource pack built, hosted and sent automatically.

Minecraft Spigot Java Version Tests Vibe

No manual resource pack work. No texture editor required. Just YAML.


โœจ What it does

Server owners define custom content as YAML files. On every reload, Andreaitemmaker:

  1. Parses all content files โ€” bad entries are reported and skipped, never break the rest.
  2. Generates textures (procedural PNGs โ€” no image files needed), model JSONs, item definitions, block states and armor assets.
  3. Wires everything for the running server version (1.20.5 โ†’ 26.2+, pack formats 32 โ†’ 88).
  4. Zips it into pack.zip + an unzipped pack/ folder, computes the SHA-1.
  5. Distributes it โ€” built-in HTTP server, fixed public URL, or upload to a CDN.
  6. Sends it to joining players with hash verification and retry messaging.

No resource pack experience required. The plugin does the whole pipeline for you.

๐Ÿ–ฅ๏ธ In-game editor

No YAML required either โ€” /aitem editor opens a full GUI editor for the same files:

  • browse, search, create, duplicate and delete items, weapons, armor, food, blocks and furniture
  • edit every field with the right control (material and base-block pickers, toggles, numeric prompts, texture designer, mechanic toggles with a generic parameter editor)
  • field-by-field validation that runs the real loader before writing, so the editor can never save something the plugin would reject
  • a per-player working copy: nothing touches disk until you press Save, closing with unsaved changes asks instead of discarding, and your own custom keys/comments/ordering are preserved
  • a 50-step undo/redo history per entry (one step per action, never per internal write), so you can step back much further than a single revert
  • automatic backup of the previous file on every save, then a normal background reload and pack regeneration
/aitem editor                      open the hub
/aitem editor create WEAPON        start a new entry and pick its id
/aitem editor edit storm_blade     open an existing entry
/aitem editor search sword         list matches across every category

See docs/editor.md for the full guide.

๐Ÿ“ธ In-game screenshots

Real in-game captures from testing the plugin:

Custom items in-game 3D helmet worn on the head
Custom block in-game Furniture in-game

๐Ÿš€ Quick start

# Build (Maven wrapper downloads Maven itself โ€” no local install needed)
./mvnw package        # Windows: mvnw.cmd package
  1. Drop target/Andreaitemmaker-1.0.0.jar into your server's plugins/ folder.
  2. Restart. The plugin creates plugins/Andreaitemmaker/ with config.yml and example content.
  3. Give yourself something:
    /aitem give example_sword
    
  4. Players get the pack automatically on join (pack.send-on-join is on by default).

Port 8163 is opened by default for the built-in pack server. Firewalled? Host the generated pack/ folder anywhere and set pack.public-url โ€” see Hosting the pack.

๐Ÿ“š Documentation

Full documentation lives in docs/ โ€” getting started, configuration, items/weapons/armor/food, blocks, furniture, mechanics, resource packs, commands & permissions, the developer API, compatibility, security and an FAQ. A friendly version is also maintained on the project wiki.

Doc Covers
getting-started.md install, first reload, folder layout
items.md items, weapons, armor, food YAML
armor.md 3D helmets + 2D worn layers
blocks.md custom blocks, persistent identity, explosions, pistons
furniture.md furniture lifecycle & protection
mechanics.md built-in + custom mechanics
resource-packs.md hosting, delivery, HTTP server
editor.md the in-game YAML editor
commands.md every command & permission
api.md developer API with examples
compatibility.md version support table
security.md path traversal, HTTP safety, secrets
manual-testing.md the QA checklist
faq.md common questions

๐Ÿ“ฆ Requirements

Requirement Minimum
Java 17+ (servers on 1.20.5+ already run Java 21)
Server Spigot or Paper 1.20.5 or newer (tested through with 1.21.5)

๐Ÿงฉ Content

Content lives in plugins/Andreaitemmaker/ โ€” one YAML file per item, block or furniture piece:

items/       โ†’ type: ITEM | WEAPON | ARMOR | FOOD
blocks/      โ†’ type: BLOCK (base-block required)
furniture/   โ†’ type: FURNITURE
assets/textures/   โ†’ your own .png files (optional, .png.mcmeta animations supported)
assets/models/     โ†’ your own model .json files (optional, e.g. Blockbench exports)

A weapon in 10 lines

# items/my_sword.yml
type: WEAPON
material: diamond_sword
display-name: "&bStorm Blade"
attributes:
  attack_damage: 9.0
texture:
  pattern: gradient            # solid | gradient | diagonal | checker
  color: "#3f9bff"
  color2: "#0f2a6b"
mechanics:
  lightning:
    damage: 4.0

Furniture

# furniture/my_lamp.yml
material: stick
small: true
consumable: true

Right-click places an invisible armor stand rendering the item model; right-click again to pick it up.

Blocks

# blocks/my_block.yml
material: stick
base-block: white_wool        # vanilla block used as the hitbox (one base = one custom block)
drops-item: true

Custom models & textures

Drop a Blockbench export into assets/models/ and reference it:

model: "assets/models/my_statue.json"

Drag-and-drop: Blockbench Bedrock Edition exports work as-is. The plugin detects them (format_version, groups, numeric texture keys) and converts them to the Java format automatically โ€” ordering inverted from/to boxes, renaming 0/1 โ†’ layer0/layer1, rounding rotation angles to 22.5ยฐ steps and stripping Bedrock-only fields. Java exports pass through untouched.

Any PNG in assets/textures/ is copied into the pack (with its .mcmeta if it's animated). The model's texture path should point at <namespace>:item/<name> (default namespace: itemmaker).

Armor: the worn look

On 1.21.2+ there are two native worn-rendering paths, chosen automatically per item.

3D helmets. A HEAD-slot armor piece whose model: file exists renders as its actual 3D model on the player's head โ€” the same vanilla mechanism the carved pumpkin uses: the client draws the equipped item's own model in head display context. The visual and the gameplay state are literally the same stack, so they can't desync: what you equip is exactly what renders, in survival, for every player. No per-tick work, no invisible entities, no ModelEngine.

# items/my_helmet.yml
type: ARMOR
material: diamond_helmet
model: "assets/models/my_helmet.json"     # rendered 3D on the head when equipped
  • Build the model in 16-unit "head space" โ€” a 16ร—16ร—16 box from 0,0,0 to 16,16,16 covers the head exactly, like the pumpkin โ€” or add a display.head entry to fine-tune the pose.
  • armor-texture: is ignored for a 3D helmet: the model is the worn look.

2D layers (chest / legs / feet, and flat helmets). The client has no native 3D worn path for body slots, so those pieces render from a flat 2D layer, never from the 3D model. Set the worn texture explicitly with a dedicated 64ร—32 humanoid armor texture:

# items/my_chestplate.yml
type: ARMOR
material: diamond_chestplate
armor-texture: "assets/textures/my_layer_1.png"   # 64x32 look when worn
  • texture: is the item icon; armor-texture: is the worn layer โ€” two different images.
  • Without armor-texture:, the plugin auto-detects by convention: assets/textures/<id>_layer_1.png / _layer_2.png, <id>_armor_layer_1/2.png, or a shared set file like eternal_armor_layer_1.png / _2.png for ids like eternal_helmet (layer 1 = helmet/ chestplate/boots, layer 2 = leggings).
  • A square UV atlas (16/32/64) is never squashed into the worn layer โ€” only flat 64ร—32 textures are used, so the worn piece can't look like garbled atlas regions.

โš™๏ธ Mechanics

Attach behaviors to any item โ€” all config-driven:

Mechanic When Options
heal right-click amount, cooldown
feed right-click amount, saturation, cooldown
effect right-click effects: [{type, duration, amplifier, ambient, particles}], cooldown
launch right-click power, cooldown
sound right-click sound, volume, pitch
lightning hit entity damage (0 = visual only)
ignite hit entity seconds
knockback hit entity power
armor-effects while worn (armor) effects: same format as effect

Unknown mechanics are reported at load so typos are caught immediately. Other plugins can register their own mechanics through the API.

๐ŸŽฎ Commands & permissions

/aitem give <id> [amount] [player]
/aitem list [items|weapons|armor|food|blocks|furniture]
/aitem info <id>
/aitem pack send [player|all] | url | regenerate
/aitem editor [create <type>|edit <id>|search <query>|reload]
/aitem reload

Aliases: andreaitemmaker, aitem, itemmaker.

Permission Default Purpose
andreaitemmaker.admin op All commands
andreaitemmaker.give op Give items
andreaitemmaker.bypass false Never receive the pack prompt
andreaitemmaker.editor op Open the in-game YAML editor

๐ŸŒ Hosting the pack

Every generation writes both pack.zip and an unzipped pack/ folder, so you always have a way to distribute the pack โ€” even when a firewall blocks the built-in server.

Strategy Setup
Built-in server (default) Port 8163 must be reachable from players' clients
Fixed URL Host pack/ or pack.zip anywhere โ†’ set pack.public-url
Upload to a file host pack.upload.enabled: true + URL/method/headers โ†’ players download from your CDN

/aitem pack url shows the current download URL and folder path.

๐Ÿ”Œ Developer API

Other plugins can use Andreaitemmaker through AndreaitemmakerAPI:

import com.andreaitemmaker.api.AndreaitemmakerAPI;
import com.andreaitemmaker.api.CustomItem;
import org.bukkit.inventory.ItemStack;

AndreaitemmakerAPI api = AndreaitemmakerAPI.get();

CustomItem sword = api.getCustomItem("my_sword");      // by id
CustomItem held  = api.getCustomItem(playerStack);     // by ItemStack (PDC tag)
ItemStack stack  = api.createItemStack("my_sword", 1); // build a stack

api.getCustomBlocks();       // all blocks
api.getCustomFurnitures();   // all furniture
api.getResourcePack();       // generate(), getUrl(), getSha1(), sendTo(player), ...
api.getMechanicRegistry();   // register(new MyMechanic()); โ€” add your own mechanics
api.reload();

Cancellable events: CustomItemUseEvent, CustomItemHitEvent, CustomItemConsumeEvent, CustomBlockPlaceEvent, CustomBlockBreakEvent, CustomFurniturePlaceEvent, CustomFurnitureBreakEvent.

๐Ÿ”Œ PlaceholderAPI (optional)

With PlaceholderAPI installed, the plugin registers placeholders under the andreaitemmaker identifier โ€” without PAPI the plugin works exactly the same, the placeholders are simply unavailable.

Placeholder Returns
%andreaitemmaker_has_item_<id>% yes/no โ€” the player has the item in their inventory
%andreaitemmaker_amount_<id>% total count of that item in the player's inventory
%andreaitemmaker_holding_<id>% yes/no โ€” the item is in the player's main hand
%andreaitemmaker_cooldown_<id>_<mechanic>% remaining cooldown seconds for that mechanic (0 = ready)
%andreaitemmaker_content_count% total content entries
%andreaitemmaker_item_count% / weapon_count / armor_count / food_count / block_count / furniture_count per-type counts

Example line for a scoreboard/TAB plugin:

Cooldown: %andreaitemmaker_cooldown_storm_blade_lightning%s

๐Ÿงช Tests

80 unit tests cover PNG encode/decode round-trips, JSON validity, texture generation, version โ†’ pack-format mapping, full modern/legacy pack generation, plus:

  • path-traversal protection (absolute paths, ../, Windows drives, backslashes, symlink escapes)
  • registry consistency (replacement removes stale indexes, base-block conflicts, immutability)
  • the embedded HTTP server over a real socket (headers, ETag/304, path security, method rejection)
  • async generation coordinator (overlapping requests coalesce to the latest snapshot)
  • imported model/texture collisions and invalid-model rejection

๐Ÿ—บ๏ธ Version support

Server Pack format Item wiring
1.20.5 โ€“ 1.20.6 32 CustomModelData + patched vanilla models
1.21 โ€“ 1.21.1 34 CustomModelData + patched vanilla models
1.21.2 โ€“ 1.21.3 42 item_model component + item definitions
1.21.4 โ€“ 1.21.8 46 / 55 / 63 / 64 item_model + equipment assets for armor
1.21.9 โ€“ 1.21.10 69 min/max format in pack.mcmeta
1.21.11 75 equipment textures under textures/entity/equipment/
26.1 / 26.2+ 84 / 88 latest

pack.format in config.yml overrides detection if you ever need to pin it.

How it works under the hood

  • Custom blocks have a persistent identity. Placing a custom block stores its id in the chunk's persistent data, keyed by block coordinates โ€” not by material. A normal vanilla STONE or WOOL block is never treated as a custom block, and the identity survives server restarts, plugin reloads and chunk unload/reload in every world. The tag is removed when the block is broken or replaced.
  • Pack generation never blocks the server. On reload the plugin snapshots the content and builds textures, models, the zip and the SHA-1 on a background thread; the finished pack is swapped in atomically, so the previously generated pack keeps being served until the new one is fully ready. Overlapping reloads/generations coalesce into a single run.
  • Reload is transactional. Config and content are loaded and validated first; the old state stays active until the new one is complete, so a broken config never leaves the plugin half-loaded.
  • Config asset paths are validated. model: and texture: entries must be relative paths inside assets/ โ€” traversal attempts (../, absolute paths, Windows drives, symlink escapes) are rejected at load time with a clear error.
  • The built-in pack server is minimal and safe. It serves only /pack.zip (never maps request paths to files), streams the pack in chunks, uses a bounded thread pool, and answers with Content-Length, Content-Type, Cache-Control and ETag/304 so clients don't re-download an unchanged pack.
  • Armor mechanics only scan players who actually wear custom armor. The tracked set is kept fresh by inventory/interact/death events plus a slow reconciliation, instead of checking every player's four armor slots on every tick.

Known limitations

  • Custom blocks: one base block per custom block; the base block's vanilla appearance is replaced for everyone with the pack.
  • Worn armor renders from the equipment asset on 1.21.2+ (the equippable component with asset_id/model wired by Paper). On 1.20.5 โ€“ 1.21.1 the piece is wearable but shows the vanilla worn texture. Worn rendering is always the 2D layer texture โ€” the client renderer has no 3D-on-body path, so a 3D model shows in hand/inventory/on the ground while the worn piece uses the layer texture. Point armor-texture: at a 64ร—32 armor texture to control the worn look (see above); without it the plugin auto-detects layer files or uses the model's own texture when it is already a flat 64ร—32 layer.
  • Items/blocks placed through the API bypass protection plugins (WorldGuard, etc.) โ€” add protections in your own listeners if needed.
  • Async generation: /aitem reload and /aitem pack regenerate report that generation started โ€” the pack swap happens in the background and players receive the new pack automatically once it's ready.
  • External world editors: replacing a custom block with a different material is detected and the stale tag cleaned up; replacing it with the same base material is indistinguishable and breaking it will drop the custom item.
  • Armor tracking covers all vanilla ways to change armor (equip clicks, right-click equip, death/respawn, join/quit) plus a 30-second safety recheck; direct setItem calls from other plugins are picked up within that window.

๐Ÿ› ๏ธ Configuration

All options live in config.yml with comments. Highlights:

namespace: itemmaker
pack:
  format: AUTO            # or pin e.g. 46
  texture-size: 16        # 16 | 32 | 64
  send-on-join: true
  required: false
  serve: { enabled: true, port: 8163 }
  public-url: ""
  upload: { enabled: false, method: PUT, url: "", headers: {} }

config-version is managed automatically โ€” plugin updates merge new options into your config.yml while preserving every value you changed.

๐Ÿ“„ License

Licensed under the Apache License 2.0. See the LICENSE file.


Made for Minecraft server owners who just want to add content.

This project was vibe coded โ€” built with an AI pair-programmer. Bugs may vibe too; issues and pull requests welcome!

About

Andreaitemmaker: Vibe coded item plugin aiming to replace premium plugins by being completely free and open source

Resources

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages