mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Add new vanilla custom item properties to JSON reader, needs testing
This commit is contained in:
parent
22f5ad12a8
commit
0a7a06a044
1 changed files with 44 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue