diff --git a/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt b/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt index 7f89cc3..cedfb54 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt @@ -4,6 +4,7 @@ import net.minecraft.item.BlockItem import net.minecraft.item.Item import net.minecraft.util.Identifier import net.minecraft.util.registry.Registry +import net.shadowfacts.phycon.PhysicalConnectivity import net.shadowfacts.phycon.item.ConsoleItem import net.shadowfacts.phycon.item.ScrewdriverItem import net.shadowfacts.phycon.block.cable.CableBlock @@ -34,6 +35,7 @@ object PhyItems { val SCREWDRIVER = ScrewdriverItem() val CONSOLE = ConsoleItem() + val TWISTED_PAIR = Item(Item.Settings()) fun init() { register(InterfaceBlock.ID, INTERFACE) @@ -48,6 +50,7 @@ object PhyItems { register(ScrewdriverItem.ID, SCREWDRIVER) register(ConsoleItem.ID, CONSOLE) + register(Identifier(PhysicalConnectivity.MODID, "twisted_pair"), TWISTED_PAIR) } private fun register(id: Identifier, item: Item) { diff --git a/src/main/resources/assets/phycon/lang/en_us.json b/src/main/resources/assets/phycon/lang/en_us.json index 0a981fd..b475786 100644 --- a/src/main/resources/assets/phycon/lang/en_us.json +++ b/src/main/resources/assets/phycon/lang/en_us.json @@ -11,6 +11,7 @@ "item.phycon.screwdriver": "Screwdriver", "item.phycon.console": "Console", + "item.phycon.twisted_pair": "Twisted Pair", "gui.phycon.terminal_buffer": "Buffer", "gui.phycon.console.details": "Device Details", diff --git a/src/main/resources/assets/phycon/models/item/twisted_pair.json b/src/main/resources/assets/phycon/models/item/twisted_pair.json new file mode 100644 index 0000000..ce0882a --- /dev/null +++ b/src/main/resources/assets/phycon/models/item/twisted_pair.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "phycon:item/twisted_pair" + } +} diff --git a/src/main/resources/assets/phycon/textures/item/twisted_pair.png b/src/main/resources/assets/phycon/textures/item/twisted_pair.png new file mode 100644 index 0000000..a4a9c9a Binary files /dev/null and b/src/main/resources/assets/phycon/textures/item/twisted_pair.png differ diff --git a/src/main/resources/data/phycon/advancements/recipes/cable.json b/src/main/resources/data/phycon/advancements/recipes/cable.json new file mode 100644 index 0000000..1737a94 --- /dev/null +++ b/src/main/resources/data/phycon/advancements/recipes/cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "phycon:cable" + ] + }, + "criteria": { + "has_twisted_pair": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "phycon:twisted_pair" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "phycon:cable" + } + } + }, + "requirements": [ + [ + "has_twisted_pair", + "has_the_recipe" + ] + ] +} diff --git a/src/main/resources/data/phycon/advancements/recipes/twisted_pair.json b/src/main/resources/data/phycon/advancements/recipes/twisted_pair.json new file mode 100644 index 0000000..50eb218 --- /dev/null +++ b/src/main/resources/data/phycon/advancements/recipes/twisted_pair.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "phycon:twisted_pair" + ] + }, + "criteria": { + "has_copper_nuggets": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "c:copper_nuggets" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "phycon:twisted_pair" + } + } + }, + "requirements": [ + [ + "has_copper_nuggets", + "has_the_recipe" + ] + ] +} diff --git a/src/main/resources/data/phycon/recipes/cable.json b/src/main/resources/data/phycon/recipes/cable.json new file mode 100644 index 0000000..0e3065e --- /dev/null +++ b/src/main/resources/data/phycon/recipes/cable.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "CCC", + "TRT", + "CCC" + ], + "key": { + "C": {"tag": "minecraft:carpets"}, + "T": {"item": "phycon:twisted_pair"}, + "R": {"item": "minecraft:redstone"} + }, + "result": { + "item": "phycon:cable", + "count": 3 + } +} diff --git a/src/main/resources/data/phycon/recipes/twisted_pair.json b/src/main/resources/data/phycon/recipes/twisted_pair.json new file mode 100644 index 0000000..401e48a --- /dev/null +++ b/src/main/resources/data/phycon/recipes/twisted_pair.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "NNN", + " ", + "NNN" + ], + "key": { + "N": {"tag": "c:copper_nuggets"} + }, + "result": { + "item": "phycon:twisted_pair" + } +}