mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-31 12:56:28 +00:00
改进模型读取
This commit is contained in:
@@ -56,7 +56,6 @@ public class BukkitItemManager extends AbstractItemManager<ItemStack> {
|
||||
private final DebugStickListener debugStickListener;
|
||||
private final ArmorEventListener armorEventListener;
|
||||
|
||||
|
||||
public BukkitItemManager(BukkitCraftEngine plugin) {
|
||||
super(plugin);
|
||||
instance = this;
|
||||
@@ -131,7 +130,7 @@ public class BukkitItemManager extends AbstractItemManager<ItemStack> {
|
||||
|
||||
@Override
|
||||
public Optional<BuildableItem<ItemStack>> getVanillaItem(Key key) {
|
||||
Material material = Registry.MATERIAL.get(Objects.requireNonNull(NamespacedKey.fromString(key.toString())));
|
||||
Material material = Registry.MATERIAL.get(KeyUtils.toNamespacedKey(key));
|
||||
if (material == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user