mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Add ItemDrop, ItemRegistry and the Loot and BlockDrops services
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user