Add ItemDrop, ItemRegistry and the Loot and BlockDrops services

This commit is contained in:
piexel committed 2026-10-09 22:02:47 +02:00
1 parent ba96e0cbc2
commit ad581be494
8 files changed
+221

No files matched your search

@@ -0,0 +1,13 @@
package com.volmit.item;
import java.util.Objects;
/** An enchantment of an {@link ItemDrop}, named by the key the platform's registry knows ({@code sharpness},
* {@code mymod:vorpal}) with the level the module decided.
*/
public record ItemEnchantment(String key, int level) {
public ItemEnchantment {
Objects.requireNonNull(key, "key");
if (level < 1) throw new IllegalArgumentException("Enchantment level must be at least 1: " + level);
}
}