mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-30 17:17:55 +00:00
Add redstone relay block (#2002)
- Move redstone methods out of the IAPIEnvironment, and into a new RedstoneAccess. We similarly move the implementation from Environment into a new RedstoneState class. The interface is possibly a little redundant (interfaces with a single implementation are always a little suspect), but it's nice to keep the consumer/producer interfaces separate. - Abstract most redstone API methods into a separate shared class, that can be used by both the rs API and the new redstone relay. - Add the new redstone relay block. The docs are probably a little lacking here, but I really struggled to write anything which wasn't just "look, it's the same as the redstone API".
This commit is contained in:
12
projects/fabric/src/generated/resources/data/computercraft/recipes/redstone_relay.json
generated
Normal file
12
projects/fabric/src/generated/resources/data/computercraft/recipes/redstone_relay.json
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "redstone",
|
||||
"key": {
|
||||
"C": {"item": "computercraft:wired_modem"},
|
||||
"R": {"tag": "c:redstone_dusts"},
|
||||
"S": {"item": "minecraft:stone"}
|
||||
},
|
||||
"pattern": ["SRS", "RCR", "SRS"],
|
||||
"result": {"item": "computercraft:redstone_relay"},
|
||||
"show_notification": true
|
||||
}
|
1
projects/fabric/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json
generated
Normal file
1
projects/fabric/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json
generated
Normal file
@@ -0,0 +1 @@
|
||||
{"replace": false, "values": ["computercraft:lectern"]}
|
@@ -13,6 +13,7 @@
|
||||
"computercraft:wireless_modem_normal",
|
||||
"computercraft:wireless_modem_advanced",
|
||||
"computercraft:wired_modem_full",
|
||||
"computercraft:cable"
|
||||
"computercraft:cable",
|
||||
"computercraft:redstone_relay"
|
||||
]
|
||||
}
|
||||
|
@@ -79,6 +79,7 @@ public class ComputerCraft {
|
||||
PeripheralLookup.get().registerForBlockEntity(WirelessModemBlockEntity::getPeripheral, ModRegistry.BlockEntities.WIRELESS_MODEM_ADVANCED.get());
|
||||
PeripheralLookup.get().registerForBlockEntity(WiredModemFullBlockEntity::getPeripheral, ModRegistry.BlockEntities.WIRED_MODEM_FULL.get());
|
||||
PeripheralLookup.get().registerForBlockEntity(CableBlockEntity::getPeripheral, ModRegistry.BlockEntities.CABLE.get());
|
||||
PeripheralLookup.get().registerForBlockEntity((b, d) -> b.peripheral(), ModRegistry.BlockEntities.REDSTONE_RELAY.get());
|
||||
|
||||
WiredElementLookup.get().registerForBlockEntity((b, d) -> b.getElement(), ModRegistry.BlockEntities.WIRED_MODEM_FULL.get());
|
||||
WiredElementLookup.get().registerForBlockEntity(CableBlockEntity::getWiredElement, ModRegistry.BlockEntities.CABLE.get());
|
||||
|
Reference in New Issue
Block a user