Compare commits

...

6 Commits

45 changed files with 650 additions and 5 deletions

BIN
assets/processor base.xcf Normal file

Binary file not shown.

BIN
assets/silicon wafer.xcf Normal file

Binary file not shown.

BIN
assets/small chest icon.xcf Normal file

Binary file not shown.

View File

@ -56,6 +56,10 @@ tasks.withType(JavaCompile) {
options.encoding = "UTF-8" options.encoding = "UTF-8"
} }
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
java { java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present. // if it is present.

View File

@ -27,6 +27,11 @@
"fabricloader": ">=0.4.0", "fabricloader": ">=0.4.0",
"fabric": "*", "fabric": "*",
"fabric-language-kotlin": ">=1.3.50", "fabric-language-kotlin": ">=1.3.50",
"phycon": "*" "phycon": "*",
"roughlyenoughitems": "*"
},
"custom": {
"modmenu:parent": "phycon"
} }
} }

View File

@ -28,7 +28,7 @@ class RedstoneControllerBlockEntity: DeviceBlockEntity(PhyBlockEntities.REDSTONE
} }
fun redstoneStateChanged() { fun redstoneStateChanged() {
if (world!!.isClient) return if (world == null || world!!.isClient) return
val oldPowered = redstonePowered val oldPowered = redstonePowered
redstonePowered = cachedState[RedstoneControllerBlock.POWERED] redstonePowered = cachedState[RedstoneControllerBlock.POWERED]

View File

@ -67,7 +67,7 @@ class RedstoneEmitterBlockEntity: DeviceBlockEntity(PhyBlockEntities.REDSTONE_EM
} }
private fun recalculateRedstone() { private fun recalculateRedstone() {
if (world!!.isClient) return if (world == null || world!!.isClient) return
if (stackToMonitor.isEmpty) { if (stackToMonitor.isEmpty) {
cachedEmittedPower = 0 cachedEmittedPower = 0

View File

@ -39,6 +39,9 @@ object PhyItems {
val TWISTED_PAIR = Item(Item.Settings()) val TWISTED_PAIR = Item(Item.Settings())
val SCREEN = Item(Item.Settings()) val SCREEN = Item(Item.Settings())
val SERIAL_CABLE = Item(Item.Settings()) val SERIAL_CABLE = Item(Item.Settings())
val SILICON_WAFER = Item(Item.Settings())
val ITEM_PROCESSOR = Item(Item.Settings())
val REDSTONE_PROCESSOR = Item(Item.Settings())
fun init() { fun init() {
register(InterfaceBlock.ID, INTERFACE) register(InterfaceBlock.ID, INTERFACE)
@ -56,6 +59,9 @@ object PhyItems {
register(Identifier(PhysicalConnectivity.MODID, "twisted_pair"), TWISTED_PAIR) register(Identifier(PhysicalConnectivity.MODID, "twisted_pair"), TWISTED_PAIR)
register(Identifier(PhysicalConnectivity.MODID, "screen"), SCREEN) register(Identifier(PhysicalConnectivity.MODID, "screen"), SCREEN)
register(Identifier(PhysicalConnectivity.MODID, "serial_cable"), SERIAL_CABLE) register(Identifier(PhysicalConnectivity.MODID, "serial_cable"), SERIAL_CABLE)
register(Identifier(PhysicalConnectivity.MODID, "silicon_wafer"), SILICON_WAFER)
register(Identifier(PhysicalConnectivity.MODID, "item_processor"), ITEM_PROCESSOR)
register(Identifier(PhysicalConnectivity.MODID, "redstone_processor"), REDSTONE_PROCESSOR)
} }
private fun register(id: Identifier, item: Item) { private fun register(id: Identifier, item: Item) {

View File

@ -0,0 +1,27 @@
{
"variants": {
"facing=down": {
"model": "phycon:block/terminal",
"x": 90
},
"facing=up": {
"model": "phycon:block/terminal",
"x": 270
},
"facing=north": {
"model": "phycon:block/terminal"
},
"facing=south": {
"model": "phycon:block/terminal",
"y": 180
},
"facing=west": {
"model": "phycon:block/terminal",
"y": 270
},
"facing=east": {
"model": "phycon:block/terminal",
"y": 90
}
}
}

View File

@ -14,6 +14,9 @@
"item.phycon.twisted_pair": "Twisted Pair", "item.phycon.twisted_pair": "Twisted Pair",
"item.phycon.screen": "Screen", "item.phycon.screen": "Screen",
"item.phycon.serial_cable": "Serial Cable", "item.phycon.serial_cable": "Serial Cable",
"item.phycon.silicon_wafer": "Silicon Wafer",
"item.phycon.item_processor": "Item Processor",
"item.phycon.redstone_processor": "Redstone Processor",
"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,14 @@
{
"parent": "block/cube",
"textures": {
"side": "phycon:block/casing",
"front": "phycon:block/terminal",
"particle": "#side",
"down": "#side",
"up": "#side",
"north": "#front",
"south": "#side",
"west": "#side",
"east": "#side"
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"side": "phycon:block/casing",
"front": "phycon:block/terminal",
"down": "#side",
"up": "#side",
"north": "#side",
"south": "#side",
"west": "#side",
"east": "#front"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:extractor"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:item_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:extractor"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:inserter"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:item_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:inserter"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:miner"
]
},
"criteria": {
"has_diamond_pick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:diamond_pickaxe"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:miner"
}
}
},
"requirements": [
[
"has_diamond_pick",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:network_interface"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:item_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:network_interface"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,40 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:item_processor",
"phycon:redstone_processor"
]
},
"criteria": {
"has_wafer": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:silicon_wafer"
}
]
}
},
"has_redstone_processor": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:redstone_processor"
}
},
"has_item_processor": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:item_processor"
}
}
},
"requirements": [
[
"has_wafer",
"has_redstone_processor",
"has_item_processor"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:redstone_controller"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:redstone_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:redstone_controller"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:redstone_emitter"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:redstone_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:redstone_emitter"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:screwdriver"
]
},
"criteria": {
"has_iron": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "c:iron_ingots"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:screwdriver"
}
}
},
"requirements": [
[
"has_iron",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:silicon_wafer"
]
},
"criteria": {
"has_quartz": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:quartz"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:silicon_wafer"
}
}
},
"requirements": [
[
"has_quartz",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:switch"
]
},
"criteria": {
"has_cable": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:cable"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:switch"
}
}
},
"requirements": [
[
"has_cable",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"phycon:terminal"
]
},
"criteria": {
"has_processor": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "phycon:item_processor"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "phycon:terminal"
}
}
},
"requirements": [
[
"has_processor",
"has_the_recipe"
]
]
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" I ",
"IPI",
"IHI"
],
"key": {
"P": {"item": "phycon:item_processor"},
"I": {"tag": "c:iron_ingots"},
"H": {"item": "minecraft:hopper"}
},
"result": {
"item": "phycon:extractor"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"IHI",
"IPI",
" I "
],
"key": {
"P": {"item": "phycon:item_processor"},
"I": {"tag": "c:iron_ingots"},
"H": {"item": "minecraft:hopper"}
},
"result": {
"item": "phycon:inserter"
}
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" C ",
"ISI",
" G "
],
"key": {
"C": {"item": "minecraft:chest"},
"I": {"tag": "c:iron_ingots"},
"S": {"item": "phycon:silicon_wafer"},
"G": {"tag": "c:gold_ingots"}
},
"result": {
"item": "phycon:item_processor"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" D ",
"IPI",
" I "
],
"key": {
"P": {"item": "phycon:item_processor"},
"D": {"item": "minecraft:diamond_pickaxe"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:miner"
}
}

View File

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" I ",
"IPI",
" I "
],
"key": {
"P": {"item": "phycon:item_processor"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:network_interface"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" L ",
"IPI",
" I "
],
"key": {
"P": {"item": "phycon:redstone_processor"},
"L": {"item": "minecraft:lever"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:redstone_controller"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" T ",
"IPI",
" I "
],
"key": {
"P": {"item": "phycon:redstone_processor"},
"T": {"item": "minecraft:redstone_torch"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:redstone_emitter"
}
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" T ",
"RSR",
" G "
],
"key": {
"T": {"item": "minecraft:redstone_torch"},
"R": {"item": "minecraft:redstone"},
"S": {"item": "phycon:silicon_wafer"},
"G": {"tag": "c:gold_ingots"}
},
"result": {
"item": "phycon:redstone_processor"
}
}

View File

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" I",
" I ",
"W "
],
"key": {
"W": {"item": "minecraft:red_wool"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:screwdriver"
}
}

View File

@ -0,0 +1,9 @@
{
"type": "minecraft:blasting",
"ingredient": {
"item": "minecraft:quartz"
},
"result": "phycon:silicon_wafer",
"experience": 5,
"cookingtime": 300
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"ICI",
"CSC",
"ICI"
],
"key": {
"S": {"item": "phycon:silicon_wafer"},
"C": {"item": "phycon:cable"},
"I": {"tag": "c:iron_ingots"}
},
"result": {
"item": "phycon:switch"
}
}

View File

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"III",
"PCP",
"III"
],
"key": {
"P": {"item": "phycon:item_processor"},
"I": {"tag": "c:iron_ingots"},
"C": {"item": "minecraft:chest"}
},
"result": {
"item": "phycon:terminal"
}
}

View File

@ -6,7 +6,17 @@
"name": "Physical Connectivity", "name": "Physical Connectivity",
"description": "Physical item storage.", "description": "Physical item storage.",
"authors": [ "authors": [
"Shadowfacts" {
"name": "Shadowfacts"
}
],
"contributors": [
{
"name": "Kat",
"contact": {
"homepage": "https://kat.blue/"
}
}
], ],
"contact": { "contact": {
"homepage": "https://git.shadowfacts.net/minecraft/PhysicalConnectivity" "homepage": "https://git.shadowfacts.net/minecraft/PhysicalConnectivity"