Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17 support. #19

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id 'fabric-loom' version '0.4-SNAPSHOT'
id 'fabric-loom' version '0.9-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '6.0.0' //https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
id 'com.github.johnrengelman.shadow' version '7.0.0' //https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand All @@ -27,16 +27,10 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

//compile group: 'com.nukkitx.protocol', name: 'bedrock-v408', version: '2.6.0-SNAPSHOT'
compile("com.nukkitx.protocol:bedrock-v431:2.7.0-SNAPSHOT") {
exclude group: 'com.nukkitx.fastutil'
exclude group: 'io.netty'
}
shadow ('com.nukkitx.protocol:bedrock-v431:2.7.0-SNAPSHOT') {
exclude group: 'com.nukkitx.fastutil'
exclude group: 'io.netty'
}
implementation 'com.nukkitx.protocol:bedrock-v448:2.9.0-SNAPSHOT'
implementation 'com.nukkitx.protocol:bedrock-v448:2.9.0-SNAPSHOT'
}

processResources {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.8
loader_version=0.11.3
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.39
loader_version=0.11.6

# Mod Properties
mod_version = 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.nukkitx.protocol.bedrock.BedrockPacketCodec;
import com.nukkitx.protocol.bedrock.BedrockSession;
import com.nukkitx.protocol.bedrock.packet.LoginPacket;
import com.nukkitx.protocol.bedrock.v431.Bedrock_v431;
import com.nukkitx.protocol.bedrock.v448.Bedrock_v448;

import io.netty.util.AsciiString;
import me.THEREALWWEFAN231.tunnelmc.TunnelMC;
Expand All @@ -30,7 +30,7 @@ public class Client {

public static Client instance = new Client();
private final Logger logger = LogManager.getLogger(ClientBatchHandler.class);
public BedrockPacketCodec bedrockPacketCodec = Bedrock_v431.V431_CODEC;
public BedrockPacketCodec bedrockPacketCodec = Bedrock_v448.V448_CODEC;
private String ip;
private int port;
private boolean onlineMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public BedrockConnectionScreen(Screen parent) {

public void init() {
this.client.keyboard.setRepeatEvents(true);
this.joinServerButton = this.addButton(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 100 + 12, 204, 20, new TranslatableText("selectServer.select"), button -> {
this.joinServerButton = this.addDrawable(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 100 + 12, 204, 20, new TranslatableText("selectServer.select"), button -> {
if (BedrockConnectionScreen.this.addressField.getText().isEmpty()) {
return;
}
Expand All @@ -48,7 +48,7 @@ public void init() {
Client.instance.initialize(BedrockConnectionScreen.this.addressField.getText(), port, BedrockConnectionScreen.this.onlineModeWidget.isChecked());
}));

this.addButton(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 125 + 12, 204, 20, ScreenTexts.CANCEL, button -> BedrockConnectionScreen.this.client.openScreen(BedrockConnectionScreen.this.parent)));
this.addDrawable(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 125 + 12, 204, 20, ScreenTexts.CANCEL, button -> BedrockConnectionScreen.this.client.setScreen(BedrockConnectionScreen.this.parent)));
this.addressField = new TextFieldWidget(this.textRenderer, this.width / 2 - 100, (this.height / 4) + 16, 200, 20, new LiteralText("Enter IP"));
this.portField = new TextFieldWidget(this.textRenderer, this.width / 2 - 100, (this.height / 4) + 46, 200, 20, new LiteralText("Enter Port"));
this.onlineModeWidget = new CheckboxWidget(this.width / 2 - 100, (this.height / 4) + 80, 200, 20, new LiteralText("Online mode"), true);
Expand Down Expand Up @@ -108,7 +108,7 @@ public void resize(MinecraftClient client, int width, int height) {
}

public void onClose() {
this.client.openScreen(this.parent);
this.client.setScreen(this.parent);
}

public void removed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onCursorStackClickEmptySlot(ScreenHandler screenHandler, int clicked

inventoryTransactionPacket.setTransactionType(TransactionType.NORMAL);
inventoryTransactionPacket.setActionType(0);//I have no idea
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

{
BedrockContainer cursorContainer = Client.instance.containers.getPlayerContainerCursorContainer();
Expand Down Expand Up @@ -82,7 +82,7 @@ public void onEmptyCursorClickStack(ScreenHandler screenHandler, int clickedSlot

inventoryTransactionPacket.setTransactionType(TransactionType.NORMAL);
inventoryTransactionPacket.setActionType(0);//I have no idea
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

{
BedrockContainer cursorContainer = Client.instance.containers.getPlayerContainerCursorContainer();
Expand Down Expand Up @@ -120,7 +120,7 @@ public void onHoverOverStackDropItem(ScreenHandler screenHandler, int clickedSlo

inventoryTransactionPacket.setTransactionType(TransactionType.NORMAL);
inventoryTransactionPacket.setActionType(0);//I have no idea
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

BedrockContainer containerForClickedSlot = ScreenHandlerTranslatorManager.getBedrockContainerFromJava(screenHandler, clickedSlotId);

Expand Down Expand Up @@ -166,7 +166,7 @@ public void onCursorStackAddToStack(ScreenHandler screenHandler, int clickedSlot

inventoryTransactionPacket.setTransactionType(TransactionType.NORMAL);
inventoryTransactionPacket.setActionType(0);//I have no idea
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
inventoryTransactionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

BedrockContainer containerForClickedSlot = JavaContainerFinder.getContainerFromJava(screenHandler, clickedSlotId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ public void translate(ClientCommandC2SPacket packet) {

if (packet.getMode() == Mode.PRESS_SHIFT_KEY) {
PlayerActionPacket playerActionPacket = new PlayerActionPacket();
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());
playerActionPacket.setAction(PlayerActionType.START_SNEAK);
playerActionPacket.setBlockPosition(Vector3i.ZERO);

Client.instance.sendPacket(playerActionPacket);
} else if (packet.getMode() == Mode.RELEASE_SHIFT_KEY) {
PlayerActionPacket playerActionPacket = new PlayerActionPacket();
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());
playerActionPacket.setAction(PlayerActionType.STOP_SNEAK);
playerActionPacket.setBlockPosition(Vector3i.ZERO);

Client.instance.sendPacket(playerActionPacket);
} else if (packet.getMode() == Mode.START_SPRINTING) {
PlayerActionPacket playerActionPacket = new PlayerActionPacket();
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());
playerActionPacket.setAction(PlayerActionType.START_SPRINT);
playerActionPacket.setBlockPosition(Vector3i.ZERO);

Client.instance.sendPacket(playerActionPacket);
} else if (packet.getMode() == Mode.STOP_SPRINTING) {
PlayerActionPacket playerActionPacket = new PlayerActionPacket();
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
playerActionPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());
playerActionPacket.setAction(PlayerActionType.STOP_SPRINT);
playerActionPacket.setBlockPosition(Vector3i.ZERO);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void translate(ClientStatusC2SPacket packet) {
RespawnPacket respawnPacket = new RespawnPacket();
respawnPacket.setPosition(Vector3f.ZERO);
respawnPacket.setState(State.CLIENT_READY);
respawnPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
respawnPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

Client.instance.sendPacket(respawnPacket);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class HandSwingC2SPacketTranslator extends PacketTranslator<HandSwingC2SP
public void translate(HandSwingC2SPacket packet) {
AnimatePacket animatePacket = new AnimatePacket();
animatePacket.setAction(AnimatePacket.Action.SWING_ARM);
animatePacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
animatePacket.setRuntimeEntityId(TunnelMC.mc.player.getId());
Client.instance.sendPacket(animatePacket);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class PlayerActionTranslator extends PacketTranslator<PlayerActionC2SPack
@Override
public void translate(PlayerActionC2SPacket packet) {

int runtimeId = TunnelMC.mc.player.getEntityId();
int runtimeId = TunnelMC.mc.player.getId();

Vector3i blockPosition = Vector3i.from(packet.getPos().getX(), packet.getPos().getY(), packet.getPos().getZ());
if (packet.getAction() == Action.START_DESTROY_BLOCK) {
Expand Down Expand Up @@ -72,8 +72,8 @@ public void translate(PlayerActionC2SPacket packet) {
inventoryTransactionPacket.setActionType(2);
inventoryTransactionPacket.setBlockPosition(blockPosition);
inventoryTransactionPacket.setBlockFace(packet.getDirection().ordinal());
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
inventoryTransactionPacket.setItemInHand(Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.inventory.selectedSlot));
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
inventoryTransactionPacket.setItemInHand(Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.getInventory().selectedSlot));
inventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y, TunnelMC.mc.player.getPos().z));
inventoryTransactionPacket.setClickPosition(Vector3f.ZERO);

Expand Down Expand Up @@ -102,7 +102,7 @@ public Class<?> getPacketClass() {

@EventTarget
public void event(EventPlayerTick event) {
int runtimeId = TunnelMC.mc.player.getEntityId();
int runtimeId = TunnelMC.mc.player.getId();
PlayerActionType action = PlayerActionType.CONTINUE_BREAK;

PlayerActionPacket playerActionPacket = new PlayerActionPacket();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public void translate(PlayerInteractBlockC2SPacket packet) {
Vector3i blockPosition = Vector3i.from(blockPos.getX(), blockPos.getY(), blockPos.getZ());
Vec3d sideHitOffset = packet.getBlockHitResult().getPos().subtract(blockPos.getX(), blockPos.getY(), blockPos.getZ());

ItemData placingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.inventory.selectedSlot);
ItemData placingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.getInventory().selectedSlot);

InventoryTransactionPacket placeInventoryTransactionPacket = new InventoryTransactionPacket();
placeInventoryTransactionPacket.setTransactionType(TransactionType.ITEM_USE);
placeInventoryTransactionPacket.setActionType(0);
placeInventoryTransactionPacket.setBlockPosition(blockPosition);
placeInventoryTransactionPacket.setBlockFace(packet.getBlockHitResult().getSide().ordinal());
placeInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
placeInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
placeInventoryTransactionPacket.setItemInHand(placingItem);
placeInventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING), TunnelMC.mc.player.getPos().z));
placeInventoryTransactionPacket.setClickPosition(Vector3f.from(sideHitOffset.x, sideHitOffset.y, sideHitOffset.z));
Expand All @@ -45,7 +45,7 @@ public void translate(PlayerInteractBlockC2SPacket packet) {
idkInventoryTransactionPacket.setActionType(1);
idkInventoryTransactionPacket.setBlockPosition(Vector3i.ZERO);
idkInventoryTransactionPacket.setBlockFace(255);
idkInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
idkInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
idkInventoryTransactionPacket.setItemInHand(placingItem);
idkInventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING), TunnelMC.mc.player.getPos().z));
idkInventoryTransactionPacket.setClickPosition(Vector3f.ZERO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@
import me.THEREALWWEFAN231.tunnelmc.translator.PacketTranslator;
import net.minecraft.entity.EntityPose;
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
import net.minecraft.world.World;

public class PlayerInteractEntityC2SPacketTranslator extends PacketTranslator<PlayerInteractEntityC2SPacket>{

@Override
public void translate(PlayerInteractEntityC2SPacket packet) {

ItemData holdingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.inventory.selectedSlot);
ItemData holdingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.getInventory().selectedSlot);

InventoryTransactionPacket inventoryTransactionPacket = new InventoryTransactionPacket();
inventoryTransactionPacket.setTransactionType(TransactionType.ITEM_USE_ON_ENTITY);
inventoryTransactionPacket.setActionType(1);
inventoryTransactionPacket.setRuntimeEntityId(packet.getEntity(TunnelMC.mc.world).getEntityId());
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
inventoryTransactionPacket.setRuntimeEntityId(packet.getEntity(TunnelMC.mc.world.getServer().getWorld(World.OVERWORLD)).getId());
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
inventoryTransactionPacket.setItemInHand(holdingItem);
inventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING), TunnelMC.mc.player.getPos().z));
inventoryTransactionPacket.setClickPosition(Vector3f.ZERO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PlayerInteractItemC2SPacketTranslator extends PacketTranslator<Play
@Override
public void translate(PlayerInteractItemC2SPacket packet) {

ItemData usingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.inventory.selectedSlot);
ItemData usingItem = Client.instance.containers.getPlayerInventory().getItemFromSlot(TunnelMC.mc.player.getInventory().selectedSlot);

if (TunnelMC.mc.crosshairTarget.getType() == HitResult.Type.BLOCK) {
BlockPos blockPos = ((BlockHitResult) TunnelMC.mc.crosshairTarget).getBlockPos();
Expand All @@ -37,7 +37,7 @@ public void translate(PlayerInteractItemC2SPacket packet) {
useInventoryTransactionPacket.setActionType(0);
useInventoryTransactionPacket.setBlockPosition(blockPosition);
useInventoryTransactionPacket.setBlockFace(((BlockHitResult) TunnelMC.mc.crosshairTarget).getSide().ordinal());
useInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
useInventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
useInventoryTransactionPacket.setItemInHand(usingItem);
useInventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING), TunnelMC.mc.player.getPos().z));
useInventoryTransactionPacket.setClickPosition(Vector3f.from(sideHitOffset.x, sideHitOffset.y, sideHitOffset.z));
Expand All @@ -52,7 +52,7 @@ public void translate(PlayerInteractItemC2SPacket packet) {
inventoryTransactionPacket.setActionType(1);
inventoryTransactionPacket.setBlockPosition(Vector3i.ZERO);
inventoryTransactionPacket.setBlockFace(255);
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.inventory.selectedSlot);
inventoryTransactionPacket.setHotbarSlot(TunnelMC.mc.player.getInventory().selectedSlot);
inventoryTransactionPacket.setItemInHand(usingItem);
inventoryTransactionPacket.setPlayerPosition(Vector3f.from(TunnelMC.mc.player.getPos().x, TunnelMC.mc.player.getPos().y + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING), TunnelMC.mc.player.getPos().z));
inventoryTransactionPacket.setClickPosition(Vector3f.ZERO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void updateHotbarItem(int hotbarSlot) {
return;
}

long runtimeEntityId = TunnelMC.mc.player.getEntityId();
long runtimeEntityId = TunnelMC.mc.player.getId();
BedrockContainer container = Client.instance.containers.getPlayerInventory();

ItemData item = container.getItemFromSlot(hotbarSlot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public static void translateMovementPacket(PlayerMoveC2SPacket playerMoveC2SPack
double currentPosX = playerMoveC2SPacket.getX(TunnelMC.mc.player.getPos().x);
double currentPosY = playerMoveC2SPacket.getY(TunnelMC.mc.player.getPos().y) + TunnelMC.mc.player.getEyeHeight(EntityPose.STANDING);
double currentPosZ = playerMoveC2SPacket.getZ(TunnelMC.mc.player.getPos().z);
float currentYaw = playerMoveC2SPacket.getYaw(TunnelMC.mc.player.yaw);
float currentPitch = playerMoveC2SPacket.getPitch(TunnelMC.mc.player.pitch);
float currentYaw = playerMoveC2SPacket.getYaw(TunnelMC.mc.player.getYaw());
float currentPitch = playerMoveC2SPacket.getPitch(TunnelMC.mc.player.getPitch());
boolean currentlyOnGround = playerMoveC2SPacket.isOnGround();

if (PlayerMoveTranslator.lastPosX == currentPosX && PlayerMoveTranslator.lastPosY == currentPosY && PlayerMoveTranslator.lastPosZ == currentPosZ && PlayerMoveTranslator.lastYaw == currentYaw && PlayerMoveTranslator.lastPitch == currentPitch && PlayerMoveTranslator.lastOnGround == currentlyOnGround) {
return;
}

int runtimeId = TunnelMC.mc.player.getEntityId();
int runtimeId = TunnelMC.mc.player.getId();

MovePlayerPacket movePlayerPacket = new MovePlayerPacket();
movePlayerPacket.setRuntimeEntityId(runtimeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void handleInputEvents(CallbackInfo callbackInfo) {

InteractPacket interactPacket = new InteractPacket();
interactPacket.setAction(Action.OPEN_INVENTORY);
interactPacket.setRuntimeEntityId(TunnelMC.mc.player.getEntityId());
interactPacket.setRuntimeEntityId(TunnelMC.mc.player.getId());

Client.instance.sendPacket(interactPacket);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ protected MixinMultiplayerScreen(Text title) {

@Inject(method = "init", at = @At(value = "RETURN"))
public void init(CallbackInfo callback) {
this.addButton(new ButtonWidget(5, 5, 150, 20, new LiteralText("Connect To Bedrock Server"), (buttonWidget) -> {
TunnelMC.mc.openScreen(new BedrockConnectionScreen(this));
this.addDrawable(new ButtonWidget(5, 5, 150, 20, new LiteralText("Connect To Bedrock Server"), (buttonWidget) -> {
TunnelMC.mc.setScreen(new BedrockConnectionScreen(this));
}));
}

Expand Down
Loading