From a3f8e653d49017b71472da8f499029350fbb560f Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Tue, 3 Dec 2024 07:30:47 +0000 Subject: [PATCH] Fix redstone relay not being registered as a peripheral This was only present on the 1.21 NF version, hence not being noticed before. Fixes #2020. I pruned my Gradle cache recently, and I'm on some truly terrible hotel wifi, so this is entirely untested. No beta, we die like men. --- .../forge/src/main/java/dan200/computercraft/ComputerCraft.java | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/forge/src/main/java/dan200/computercraft/ComputerCraft.java b/projects/forge/src/main/java/dan200/computercraft/ComputerCraft.java index bd5c90c97..a251aecee 100644 --- a/projects/forge/src/main/java/dan200/computercraft/ComputerCraft.java +++ b/projects/forge/src/main/java/dan200/computercraft/ComputerCraft.java @@ -156,6 +156,7 @@ public static void onRegisterCapabilities(RegisterCapabilitiesEvent event) { event.registerBlockEntity(PeripheralCapability.get(), ModRegistry.BlockEntities.WIRELESS_MODEM_ADVANCED.get(), WirelessModemBlockEntity::getPeripheral); event.registerBlockEntity(PeripheralCapability.get(), ModRegistry.BlockEntities.WIRED_MODEM_FULL.get(), WiredModemFullBlockEntity::getPeripheral); event.registerBlockEntity(PeripheralCapability.get(), ModRegistry.BlockEntities.CABLE.get(), CableBlockEntity::getPeripheral); + event.registerBlockEntity(PeripheralCapability.get(), ModRegistry.BlockEntities.REDSTONE_RELAY.get(), (b, d) -> b.peripheral()); event.registerBlockEntity(WiredElementCapability.get(), ModRegistry.BlockEntities.WIRED_MODEM_FULL.get(), (b, d) -> b.getElement()); event.registerBlockEntity(WiredElementCapability.get(), ModRegistry.BlockEntities.CABLE.get(), CableBlockEntity::getWiredElement);