From 17a5924fcaea82d166e12d0b82bec9ade0c139b4 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 15 Oct 2023 16:53:19 +0100 Subject: [PATCH] Add recipes, translations, etc for the mysterious egg and spikes --- .../unicopia/block/PileBlock.java | 1 - .../resources/assets/unicopia/lang/en_us.json | 1 + .../unicopia/models/item/mysterious_egg.json | 15 ++++- .../loot_tables/blocks/mysterious_egg.json | 64 +++++++++++++++++++ .../data/unicopia/recipes/chitin_spikes.json | 13 ++++ .../tags/items/groups/changeling.json | 3 + 6 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/data/unicopia/loot_tables/blocks/mysterious_egg.json create mode 100644 src/main/resources/data/unicopia/recipes/chitin_spikes.json diff --git a/src/main/java/com/minelittlepony/unicopia/block/PileBlock.java b/src/main/java/com/minelittlepony/unicopia/block/PileBlock.java index 561fa047..b3eed30f 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/PileBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/PileBlock.java @@ -96,5 +96,4 @@ public class PileBlock extends Block implements Waterloggable { } return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos); } - } diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 161d97dc..f75c1836 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -207,6 +207,7 @@ "block.unicopia.sour_apple_sprout": "Sour Apple Sprout", "block.unicopia.surface_chitin": "Surface Chitin", + "block.unicopia.mysterious_egg": "Mysterious Egg", "block.unicopia.hive": "Hive", "block.unicopia.chitin": "Chitin", "block.unicopia.chitin_spikes": "Chitin Spikes", diff --git a/src/main/resources/assets/unicopia/models/item/mysterious_egg.json b/src/main/resources/assets/unicopia/models/item/mysterious_egg.json index cbcb6302..05f44e97 100644 --- a/src/main/resources/assets/unicopia/models/item/mysterious_egg.json +++ b/src/main/resources/assets/unicopia/models/item/mysterious_egg.json @@ -1,3 +1,16 @@ { - "parent": "unicopia:block/mysterious_egg_1" + "parent": "unicopia:block/mysterious_egg_1", + "gui_light": "side", + "display": { + "gui": { + "rotation": [ 30, 225, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "fixed": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + } + } } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/mysterious_egg.json b/src/main/resources/data/unicopia/loot_tables/blocks/mysterious_egg.json new file mode 100644 index 00000000..915f5152 --- /dev/null +++ b/src/main/resources/data/unicopia/loot_tables/blocks/mysterious_egg.json @@ -0,0 +1,64 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:mysterious_egg", + "functions": [ + { + "add": false, + "count": 1, + "function": "minecraft:set_count", + "conditions": [ + { + "block": "unicopia:mysterious_egg", + "condition": "minecraft:block_state_property", + "properties": { + "count": "1" + } + } + ] + }, + { + "add": false, + "count": 2, + "function": "minecraft:set_count", + "conditions": [ + { + "block": "unicopia:mysterious_egg", + "condition": "minecraft:block_state_property", + "properties": { + "count": "2" + } + } + ] + }, + { + "add": false, + "count": 3, + "function": "minecraft:set_count", + "conditions": [ + { + "block": "unicopia:mysterious_egg", + "condition": "minecraft:block_state_property", + "properties": { + "count": "3" + } + } + ] + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/recipes/chitin_spikes.json b/src/main/resources/data/unicopia/recipes/chitin_spikes.json new file mode 100644 index 00000000..f7f20647 --- /dev/null +++ b/src/main/resources/data/unicopia/recipes/chitin_spikes.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "###" + ], + "key": { + "#": [ + { "item": "unicopia:chitin" } + ] + }, + "result": { "item": "unicopia:chitin_spikes", "count": 1 } +} diff --git a/src/main/resources/data/unicopia/tags/items/groups/changeling.json b/src/main/resources/data/unicopia/tags/items/groups/changeling.json index 9728ca5c..cea725a9 100644 --- a/src/main/resources/data/unicopia/tags/items/groups/changeling.json +++ b/src/main/resources/data/unicopia/tags/items/groups/changeling.json @@ -8,6 +8,9 @@ "unicopia:chiselled_chitin_slab", "unicopia:chiselled_chitin_stairs", "unicopia:chiselled_chitin_hull", + "unicopia:chitin_spikes", + "unicopia:mysterious_egg", + "unicopia:hive", "#unicopia:food_types/cooked_meat", "#unicopia:food_types/raw_meat", "#unicopia:food_types/raw_insect",