mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-29 16:47:56 +00:00
Merge branch 'mc-1.20.x' into mc-1.21.x
This commit is contained in:
@@ -7,6 +7,7 @@ package dan200.computercraft.mixin.client;
|
||||
import dan200.computercraft.client.ClientHooks;
|
||||
import dan200.computercraft.client.ClientRegistry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.main.GameConfig;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.server.packs.resources.ReloadableResourceManager;
|
||||
@@ -29,6 +30,12 @@ class MinecraftMixin {
|
||||
ClientHooks.onWorldUnload();
|
||||
}
|
||||
|
||||
@Inject(method = "disconnect(Lnet/minecraft/client/gui/screens/Screen;Z)V", at = @At("HEAD"))
|
||||
@SuppressWarnings("unused")
|
||||
private void disconnect(Screen screen, boolean keepResourcePacks, CallbackInfo ci) {
|
||||
ClientHooks.onDisconnect();
|
||||
}
|
||||
|
||||
@Inject(
|
||||
method = "<init>(Lnet/minecraft/client/main/GameConfig;)V",
|
||||
at = @At(
|
||||
|
@@ -95,6 +95,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