added dwarf
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.OptionalInt;
|
|||||||
|
|
||||||
public class CustomDataTypes {
|
public class CustomDataTypes {
|
||||||
|
|
||||||
|
@SuppressWarnings("null")
|
||||||
public static final SerializableDataType<ItemStack> STACK_OR_ITEM_NAME = new SerializableDataType<>(
|
public static final SerializableDataType<ItemStack> STACK_OR_ITEM_NAME = new SerializableDataType<>(
|
||||||
ItemStack.class,
|
ItemStack.class,
|
||||||
PacketByteBuf::writeItemStack,
|
PacketByteBuf::writeItemStack,
|
||||||
@@ -23,6 +24,7 @@ public class CustomDataTypes {
|
|||||||
jsonElement -> CodecHelper.STACK_OR_ITEM_NAME.decode(JsonOps.INSTANCE, jsonElement).result().orElseThrow(() -> new JsonParseException("Could not parse ItemStack from JSON.")).getFirst()
|
jsonElement -> CodecHelper.STACK_OR_ITEM_NAME.decode(JsonOps.INSTANCE, jsonElement).result().orElseThrow(() -> new JsonParseException("Could not parse ItemStack from JSON.")).getFirst()
|
||||||
);*/
|
);*/
|
||||||
|
|
||||||
|
@SuppressWarnings("null")
|
||||||
public static final SerializableDataType<OptionalBool> OPTIONAL_BOOL = new SerializableDataType<>(OptionalBool.class,
|
public static final SerializableDataType<OptionalBool> OPTIONAL_BOOL = new SerializableDataType<>(OptionalBool.class,
|
||||||
PacketByteBuf::writeEnumConstant,
|
PacketByteBuf::writeEnumConstant,
|
||||||
buf -> buf.readEnumConstant(OptionalBool.class),
|
buf -> buf.readEnumConstant(OptionalBool.class),
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public enum OptionalBool {
|
|||||||
return this == DEFAULT ? Optional.empty() : Optional.of(isTrue());
|
return this == DEFAULT ? Optional.empty() : Optional.of(isTrue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("null")
|
||||||
public static MapCodec<OptionalBool> codecFieldOf(String fieldName) {
|
public static MapCodec<OptionalBool> codecFieldOf(String fieldName) {
|
||||||
return Codec.BOOL.optionalFieldOf(fieldName).xmap(opt -> opt.map(aBoolean -> aBoolean ? TRUE : FALSE).orElse(DEFAULT), OptionalBool::asOptional);
|
return Codec.BOOL.optionalFieldOf(fieldName).xmap(opt -> opt.map(aBoolean -> aBoolean ? TRUE : FALSE).orElse(DEFAULT), OptionalBool::asOptional);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
//-----Muckunde-----//
|
//-----elf-----//
|
||||||
"origin.faithful.elf.name": "Elf",
|
"origin.faithful.elf.name": "Elf",
|
||||||
"origin.faithful.elf.description": "Prideful, elegant beings of earthly origin.",
|
"origin.faithful.elf.description": "Prideful, elegant beings of earthly origin.",
|
||||||
"power.faithful.elf-powers/elven_craftsmanship.name": "Elven Magic",
|
"power.faithful.elf-powers/elven_craftsmanship.name": "Elven Magic",
|
||||||
@@ -9,5 +9,15 @@
|
|||||||
"power.faithful.elf-powers/light_foot.name": "Light of Foot",
|
"power.faithful.elf-powers/light_foot.name": "Light of Foot",
|
||||||
"power.faithful.elf-powers/light_foot.description": "Elves can walk lightly across snow where the boots of humans would sink.",
|
"power.faithful.elf-powers/light_foot.description": "Elves can walk lightly across snow where the boots of humans would sink.",
|
||||||
"power.faithful.elf-powers/nature_connection.name": "Nature's Connection",
|
"power.faithful.elf-powers/nature_connection.name": "Nature's Connection",
|
||||||
"power.faithful.elf-powers/nature_connection.description": "When in biomes such as forests or jungles, elves may receive certain buffs."
|
"power.faithful.elf-powers/nature_connection.description": "When in biomes such as forests or jungles, elves may receive certain buffs.",
|
||||||
|
|
||||||
|
//-----dwarf-----//
|
||||||
|
"origin.faithful.dwarf.name": "Dwarf",
|
||||||
|
"origin.faithful.dwarf.description": "Incredible craftsmen.",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_craftsmanship.name": "Dwarven Craftsmanship",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_craftsmanship.description": "Dwarven craftsmanship is said to be rivaled only be that of Elves. Tools crafted by Dwarves are remarkably sturdier than those crafted by common smiths.",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_resistance.name": "Dwarven Resistance",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_resistance.description": "Dwarves have thicker skin that acts as armour.",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_mining.name": "Exceptional Miner",
|
||||||
|
"power.faithful.dwarf-powers/dwarven_mining.description": "Dwarves are known to be the greatest miners in the world, they are able to get valuable ores from bland stones."
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"function": "minecraft:set_lore",
|
||||||
|
"entity": "this",
|
||||||
|
"lore": [
|
||||||
|
{
|
||||||
|
"text": "A Dwarven crafted tool.",
|
||||||
|
"color": "dark_purple",
|
||||||
|
"italic": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"replace": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:set_enchantments",
|
||||||
|
"enchantments": {
|
||||||
|
"minecraft:unbreaking": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:loot_table",
|
||||||
|
"name": "apoli:replaced_loot_table"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:tag",
|
||||||
|
"name": "c:gems",
|
||||||
|
"expand": true,
|
||||||
|
"weight": 1,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:random_chance",
|
||||||
|
"chance": 0.1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:tag",
|
||||||
|
"name": "c:raw_ores",
|
||||||
|
"expand": true,
|
||||||
|
"weight": 1,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:random_chance",
|
||||||
|
"chance": 0.1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
10
src/main/resources/data/faithful/origins/dwarf.json
Normal file
10
src/main/resources/data/faithful/origins/dwarf.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"powers": [
|
||||||
|
"faithful:dwarf-powers/dwarven_craftsmanship",
|
||||||
|
"faithful:dwarf-powers/dwarven_mining",
|
||||||
|
"faithful:dwarf-powers/dwarven_resistance"
|
||||||
|
],
|
||||||
|
"icon": "minecraft:dirt",
|
||||||
|
"order": 1001,
|
||||||
|
"impact": 3
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
{
|
||||||
|
"type": "origins:multiple",
|
||||||
|
"alter_diamond_axe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "diamond_axe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_gold_axe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "golden_axe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_iron_axe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "iron_axe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_stone_axe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "stone_axe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_wooden_axe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "wooden_axe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"alter_diamond_pickaxe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "faithful:diamond_pickaxe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_gold_pickaxe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "golden_pickaxe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_iron_pickaxe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "iron_pickaxe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_stone_pickaxe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "stone_pickaxe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_wooden_pickaxe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "wooden_pickaxe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"alter_diamond_shovel": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "diamond_shovel",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_gold_shovel": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "golden_shovel",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_iron_shovel": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "iron_shovel",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_stone_shovel": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "stone_shovel",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_wooden_shovel": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "wooden_shovel",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"alter_diamond_hoe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "diamond_hoe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_gold_hoe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "faithful:golden_hoe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_iron_hoe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "iron_hoe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_stone_hoe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "stone_hoe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alter_wooden_hoe": {
|
||||||
|
"type": "origins:modify_crafting",
|
||||||
|
"recipe": "wooden_hoe",
|
||||||
|
"item_action": {
|
||||||
|
"type": "origins:modify",
|
||||||
|
"modifier": "faithful:dwarf_sturdy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "origins:replace_loot_table",
|
||||||
|
"replace": {
|
||||||
|
"minecraft:blocks/stone": "faithful:dwarf_mining",
|
||||||
|
"minecraft:blocks/deepslate": "faithful:dwarf_mining"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"type": "origins:attribute",
|
||||||
|
"modifier": {
|
||||||
|
"name": "Natural Armor health bonus",
|
||||||
|
"attribute": "minecraft:generic.armor",
|
||||||
|
"value": 4.0,
|
||||||
|
"operation": "addition"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "equipment",
|
||||||
|
"key": {
|
||||||
|
"#": {
|
||||||
|
"item": "minecraft:stick"
|
||||||
|
},
|
||||||
|
"X": {
|
||||||
|
"item": "minecraft:diamond"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"XXX",
|
||||||
|
" # ",
|
||||||
|
" # "
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "minecraft:diamond_pickaxe"
|
||||||
|
},
|
||||||
|
"show_notification": true
|
||||||
|
}
|
||||||
21
src/main/resources/data/faithful/recipes/golden_hoe.json
Normal file
21
src/main/resources/data/faithful/recipes/golden_hoe.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "equipment",
|
||||||
|
"key": {
|
||||||
|
"#": {
|
||||||
|
"item": "minecraft:stick"
|
||||||
|
},
|
||||||
|
"X": {
|
||||||
|
"item": "minecraft:gold_ingot"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"XX",
|
||||||
|
" #",
|
||||||
|
" #"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "minecraft:golden_hoe"
|
||||||
|
},
|
||||||
|
"show_notification": true
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"replace": false,
|
"replace": false,
|
||||||
"origins": [
|
"origins": [
|
||||||
"faithful:elf",
|
"faithful:elf",
|
||||||
|
"faithful:dwarf",
|
||||||
{
|
{
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "origins:equipped_item",
|
"type": "origins:equipped_item",
|
||||||
|
|||||||
Reference in New Issue
Block a user