Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-08 17:20:20 +01:00
Add new vanilla custom item properties to JSON reader, needs testing
Dieser Commit ist enthalten in:
Ursprung
22f5ad12a8
Commit
0a7a06a044
@ -225,6 +225,50 @@ public class MappingsReader_v1 extends MappingsReader {
|
||||
customItemData.tags(tagsSet);
|
||||
}
|
||||
|
||||
if (node.has("stack_size")) {
|
||||
customItemData.stackSize(node.get("stack_size").asInt());
|
||||
}
|
||||
|
||||
if (node.has("max_damage")) {
|
||||
customItemData.maxDamage(node.get("max_damage").asInt());
|
||||
}
|
||||
|
||||
if (node.has("attack_damage")) {
|
||||
customItemData.maxDamage(node.get("attack_damage").asInt());
|
||||
}
|
||||
|
||||
if (node.has("tool_type")) {
|
||||
customItemData.toolType(node.get("tool_type").asText());
|
||||
}
|
||||
|
||||
if (node.has("tool_tier")) {
|
||||
customItemData.toolTier(node.get("tool_tier").asText());
|
||||
}
|
||||
|
||||
if (node.has("armor_type")) {
|
||||
customItemData.armorType(node.get("armor_type").asText());
|
||||
}
|
||||
|
||||
if (node.has("protection_value")) {
|
||||
customItemData.protectionValue(node.get("protection_value").asInt());
|
||||
}
|
||||
|
||||
if (node.has("hat")) {
|
||||
customItemData.hat(node.get("hat").asBoolean());
|
||||
}
|
||||
|
||||
if (node.has("foil")) {
|
||||
customItemData.foil(node.get("foil").asBoolean());
|
||||
}
|
||||
|
||||
if (node.has("edible")) {
|
||||
customItemData.edible(node.get("edible").asBoolean());
|
||||
}
|
||||
|
||||
if (node.has("can_always_eat")) {
|
||||
customItemData.canAlwaysEat(node.get("can_always_eat").asBoolean());
|
||||
}
|
||||
|
||||
return customItemData.build();
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren