diff --git a/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt b/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt index 704d196..76913fe 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/init/PhyItems.kt @@ -37,6 +37,8 @@ object PhyItems { val SCREWDRIVER = ScrewdriverItem() val CONSOLE = ConsoleItem() val TWISTED_PAIR = Item(Item.Settings()) + val SCREEN = Item(Item.Settings()) + val SERIAL_CABLE = Item(Item.Settings()) fun init() { register(InterfaceBlock.ID, INTERFACE) @@ -52,6 +54,8 @@ object PhyItems { register(ScrewdriverItem.ID, SCREWDRIVER) register(ConsoleItem.ID, CONSOLE) register(Identifier(PhysicalConnectivity.MODID, "twisted_pair"), TWISTED_PAIR) + register(Identifier(PhysicalConnectivity.MODID, "screen"), SCREEN) + register(Identifier(PhysicalConnectivity.MODID, "serial_cable"), SERIAL_CABLE) } 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 b475786..1292d0e 100644 --- a/src/main/resources/assets/phycon/lang/en_us.json +++ b/src/main/resources/assets/phycon/lang/en_us.json @@ -12,6 +12,8 @@ "item.phycon.screwdriver": "Screwdriver", "item.phycon.console": "Console", "item.phycon.twisted_pair": "Twisted Pair", + "item.phycon.screen": "Screen", + "item.phycon.serial_cable": "Serial Cable", "gui.phycon.terminal_buffer": "Buffer", "gui.phycon.console.details": "Device Details", diff --git a/src/main/resources/assets/phycon/models/item/screen.json b/src/main/resources/assets/phycon/models/item/screen.json new file mode 100644 index 0000000..a657bf0 --- /dev/null +++ b/src/main/resources/assets/phycon/models/item/screen.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "phycon:item/screen" + } +} diff --git a/src/main/resources/assets/phycon/models/item/serial_cable.json b/src/main/resources/assets/phycon/models/item/serial_cable.json new file mode 100644 index 0000000..160ca26 --- /dev/null +++ b/src/main/resources/assets/phycon/models/item/serial_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "phycon:item/serial_cable" + } +} diff --git a/src/main/resources/assets/phycon/textures/item/screen.png b/src/main/resources/assets/phycon/textures/item/screen.png new file mode 100644 index 0000000..46e93d2 Binary files /dev/null and b/src/main/resources/assets/phycon/textures/item/screen.png differ diff --git a/src/main/resources/assets/phycon/textures/item/serial_cable.png b/src/main/resources/assets/phycon/textures/item/serial_cable.png new file mode 100644 index 0000000..2c97fef Binary files /dev/null and b/src/main/resources/assets/phycon/textures/item/serial_cable.png differ diff --git a/src/main/resources/data/phycon/advancements/recipes/console.json b/src/main/resources/data/phycon/advancements/recipes/console.json new file mode 100644 index 0000000..d8395d1 --- /dev/null +++ b/src/main/resources/data/phycon/advancements/recipes/console.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "phycon:console" + ] + }, + "criteria": { + "has_serial_cable": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "phycon:serial_cable" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "phycon:console" + } + } + }, + "requirements": [ + [ + "has_serial_cable", + "has_the_recipe" + ] + ] +} diff --git a/src/main/resources/data/phycon/advancements/recipes/screen.json b/src/main/resources/data/phycon/advancements/recipes/screen.json new file mode 100644 index 0000000..92203c7 --- /dev/null +++ b/src/main/resources/data/phycon/advancements/recipes/screen.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "phycon:screen" + ] + }, + "criteria": { + "has_glowstone": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:glowstone_dust" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "phycon:screen" + } + } + }, + "requirements": [ + [ + "has_glowstone", + "has_the_recipe" + ] + ] +} diff --git a/src/main/resources/data/phycon/advancements/recipes/serial_cable.json b/src/main/resources/data/phycon/advancements/recipes/serial_cable.json new file mode 100644 index 0000000..297c276 --- /dev/null +++ b/src/main/resources/data/phycon/advancements/recipes/serial_cable.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "phycon:serial_cable" + ] + }, + "criteria": { + "has_redstone_and_gold": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:redstone" + }, + { + "tag": "c:gold_ingots" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "phycon:serial_cable" + } + } + }, + "requirements": [ + [ + "has_redstone_and_gold", + "has_the_recipe" + ] + ] +} diff --git a/src/main/resources/data/phycon/recipes/console.json b/src/main/resources/data/phycon/recipes/console.json new file mode 100644 index 0000000..0053262 --- /dev/null +++ b/src/main/resources/data/phycon/recipes/console.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " I ", + "ISI", + " C " + ], + "key": { + "I": {"tag": "c:iron_ingots"}, + "S": {"item": "phycon:screen"}, + "C": {"item": "phycon:serial_cable"} + }, + "result": { + "item": "phycon:console" + } +} diff --git a/src/main/resources/data/phycon/recipes/screen.json b/src/main/resources/data/phycon/recipes/screen.json new file mode 100644 index 0000000..22acf52 --- /dev/null +++ b/src/main/resources/data/phycon/recipes/screen.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "ggg", + "RRR" + ], + "key": { + "G": {"item": "minecraft:glass_pane"}, + "g": {"item": "minecraft:glowstone_dust"}, + "R": {"item": "minecraft:redstone"} + }, + "result": { + "item": "phycon:screen" + } +} diff --git a/src/main/resources/data/phycon/recipes/serial_cable.json b/src/main/resources/data/phycon/recipes/serial_cable.json new file mode 100644 index 0000000..1c28ccb --- /dev/null +++ b/src/main/resources/data/phycon/recipes/serial_cable.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " C ", + "CRC", + "GC " + ], + "key": { + "C": {"item": "minecraft:blue_carpet"}, + "R": {"item": "minecraft:redstone"}, + "G": {"tag": "c:gold_ingots"} + }, + "result": { + "item": "phycon:serial_cable" + } +}