mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-23 17:09:19 +00:00
修复encodeJava
This commit is contained in:
@@ -18,6 +18,7 @@ public class ItemSettings {
|
||||
EquipmentGeneration equipment;
|
||||
boolean canRepair = true;
|
||||
List<AnvilRepairItem> anvilRepairItems = List.of();
|
||||
boolean renameable = true;
|
||||
|
||||
private ItemSettings() {}
|
||||
|
||||
@@ -43,6 +44,7 @@ public class ItemSettings {
|
||||
newSettings.equipment = settings.equipment;
|
||||
newSettings.canRepair = settings.canRepair;
|
||||
newSettings.anvilRepairItems = settings.anvilRepairItems;
|
||||
newSettings.renameable = settings.renameable;
|
||||
return newSettings;
|
||||
}
|
||||
|
||||
@@ -66,6 +68,10 @@ public class ItemSettings {
|
||||
return fuelTime;
|
||||
}
|
||||
|
||||
public boolean renameable() {
|
||||
return renameable;
|
||||
}
|
||||
|
||||
public Set<Key> tags() {
|
||||
return tags;
|
||||
}
|
||||
@@ -89,6 +95,11 @@ public class ItemSettings {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemSettings renameable(boolean renameable) {
|
||||
this.renameable = renameable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemSettings fuelTime(int fuelTime) {
|
||||
this.fuelTime = fuelTime;
|
||||
return this;
|
||||
@@ -124,6 +135,10 @@ public class ItemSettings {
|
||||
boolean bool = (boolean) value;
|
||||
return settings -> settings.canRepair(bool);
|
||||
}));
|
||||
registerFactory("renameable", (value -> {
|
||||
boolean bool = (boolean) value;
|
||||
return settings -> settings.renameable(bool);
|
||||
}));
|
||||
registerFactory("anvil-repair-item", (value -> {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> materials = (List<Map<String, Object>>) value;
|
||||
|
||||
Reference in New Issue
Block a user