Skip to content

Commit

Permalink
refactor: delete broken features
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Apr 3, 2024
1 parent 5c724f1 commit 818e8dc
Show file tree
Hide file tree
Showing 28 changed files with 2 additions and 1,681 deletions.
27 changes: 0 additions & 27 deletions src/main/java/com/github/zly2006/enclosure/client/ClientMain.java
Original file line number Diff line number Diff line change
@@ -1,45 +1,23 @@
package com.github.zly2006.enclosure.client;

import com.github.zly2006.enclosure.command.ClientSession;
import com.github.zly2006.enclosure.gui.EnclosureScreen;
import com.github.zly2006.enclosure.gui.EnclosureScreenHandler;
import com.github.zly2006.enclosure.network.*;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.glfw.GLFW;

@Environment(EnvType.CLIENT)
public class ClientMain implements ClientModInitializer {
public static ClientConfig config = new ClientConfig();
public final static KeyBinding openScreenKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
"enclosure.key.open_screen",
InputUtil.Type.KEYSYM,
GLFW.GLFW_KEY_R,
"enclosure.key._category"
));
public static ClientSession clientSession;
public static boolean isEnclosureInstalled = false;

@Override
public void onInitializeClient() {
UUIDCacheS2CPacket.register();
SyncSelectionS2CPacket.register();
ConfirmRequestS2CPacket.register();
HandledScreens.register(EnclosureScreenHandler.ENCLOSURE_SCREEN_HANDLER, EnclosureScreen::new);
EnclosureWorldRenderer.INSTANCE.register();
SyncPermissionS2CPacket.register();
ClientPlayConnectionEvents.JOIN.register((handler, sender, client) -> {
clientSession = new ClientSession();
EnclosureInstalledC2SPacket.send();
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
isEnclosureInstalled = true;
clientSession.setPos1(new BlockPos(0, 0, 0));
Expand All @@ -50,11 +28,6 @@ public void onInitializeClient() {
isEnclosureInstalled = false;
clientSession = null;
});
ClientTickEvents.END_CLIENT_TICK.register(client -> {
if (openScreenKey.wasPressed()) {
RequestOpenScreenC2SPPacket.send(client, "");
}
});
ClientTickEvents.START_CLIENT_TICK.register(client -> {
});
}
Expand Down
73 changes: 0 additions & 73 deletions src/main/java/com/github/zly2006/enclosure/gui/AboutScreen.java

This file was deleted.

This file was deleted.

55 changes: 0 additions & 55 deletions src/main/java/com/github/zly2006/enclosure/gui/ConfirmScreen.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 818e8dc

Please sign in to comment.