Add Twisted Pair and Cable recipe

This commit is contained in:
Shadowfacts 2021-03-06 20:04:32 -05:00
parent 2198b5e10d
commit c9bcfd29d5
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
8 changed files with 105 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import net.minecraft.item.BlockItem
import net.minecraft.item.Item import net.minecraft.item.Item
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
import net.minecraft.util.registry.Registry import net.minecraft.util.registry.Registry
import net.shadowfacts.phycon.PhysicalConnectivity
import net.shadowfacts.phycon.item.ConsoleItem import net.shadowfacts.phycon.item.ConsoleItem
import net.shadowfacts.phycon.item.ScrewdriverItem import net.shadowfacts.phycon.item.ScrewdriverItem
import net.shadowfacts.phycon.block.cable.CableBlock import net.shadowfacts.phycon.block.cable.CableBlock
@ -34,6 +35,7 @@ object PhyItems {
val SCREWDRIVER = ScrewdriverItem() val SCREWDRIVER = ScrewdriverItem()
val CONSOLE = ConsoleItem() val CONSOLE = ConsoleItem()
val TWISTED_PAIR = Item(Item.Settings())
fun init() { fun init() {
register(InterfaceBlock.ID, INTERFACE) register(InterfaceBlock.ID, INTERFACE)
@ -48,6 +50,7 @@ object PhyItems {
register(ScrewdriverItem.ID, SCREWDRIVER) register(ScrewdriverItem.ID, SCREWDRIVER)
register(ConsoleItem.ID, CONSOLE) register(ConsoleItem.ID, CONSOLE)
register(Identifier(PhysicalConnectivity.MODID, "twisted_pair"), TWISTED_PAIR)
} }
private fun register(id: Identifier, item: Item) { private fun register(id: Identifier, item: Item) {

View File

@ -11,6 +11,7 @@
"item.phycon.screwdriver": "Screwdriver", "item.phycon.screwdriver": "Screwdriver",
"item.phycon.console": "Console", "item.phycon.console": "Console",
"item.phycon.twisted_pair": "Twisted Pair",
"gui.phycon.terminal_buffer": "Buffer", "gui.phycon.terminal_buffer": "Buffer",
"gui.phycon.console.details": "Device Details", "gui.phycon.console.details": "Device Details",

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "phycon:item/twisted_pair"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

View File

@ -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"
]
]
}

View File

@ -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"
]
]
}

View File

@ -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
}
}

View File

@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"NNN",
" ",
"NNN"
],
"key": {
"N": {"tag": "c:copper_nuggets"}
},
"result": {
"item": "phycon:twisted_pair"
}
}