mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-30 20:39:10 +00:00
允许染色配方
This commit is contained in:
@@ -27,6 +27,7 @@ public class ItemSettings {
|
||||
boolean renameable = true;
|
||||
boolean canPlaceRelatedVanillaBlock = false;
|
||||
ProjectileMeta projectileMeta;
|
||||
boolean dyeable = false;
|
||||
|
||||
private ItemSettings() {}
|
||||
|
||||
@@ -56,6 +57,7 @@ public class ItemSettings {
|
||||
newSettings.renameable = settings.renameable;
|
||||
newSettings.canPlaceRelatedVanillaBlock = settings.canPlaceRelatedVanillaBlock;
|
||||
newSettings.projectileMeta = settings.projectileMeta;
|
||||
newSettings.dyeable = settings.dyeable;
|
||||
return newSettings;
|
||||
}
|
||||
|
||||
@@ -95,6 +97,10 @@ public class ItemSettings {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public boolean dyeable() {
|
||||
return dyeable;
|
||||
}
|
||||
|
||||
public List<AnvilRepairItem> repairItems() {
|
||||
return anvilRepairItems;
|
||||
}
|
||||
@@ -144,6 +150,11 @@ public class ItemSettings {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemSettings dyeable(boolean bool) {
|
||||
this.dyeable = bool;
|
||||
return this;
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface Modifier {
|
||||
|
||||
@@ -217,6 +228,10 @@ public class ItemSettings {
|
||||
Quaternionf rotation = MiscUtils.getAsQuaternionf(ResourceConfigUtils.get(args, "rotation-left", "rotation"), "rotation-left");
|
||||
return settings -> settings.projectileMeta(new ProjectileMeta(customTridentItemId, displayType, scale, translation, rotation));
|
||||
}));
|
||||
registerFactory("dyeable", (value -> {
|
||||
boolean bool = (boolean) value;
|
||||
return settings -> settings.dyeable(bool);
|
||||
}));
|
||||
}
|
||||
|
||||
private static void registerFactory(String id, ItemSettings.Modifier.Factory factory) {
|
||||
|
||||
Reference in New Issue
Block a user