mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2025-01-06 18:57:43 +01:00
19w13b - Rebuild this when ViaBackwards#103 and ViaRewind#109 are merged
This commit is contained in:
parent
16519d6f35
commit
16929d5e2e
build.gradle.kts
src/main/java/com/github/creeper123123321/viafabric
@ -31,7 +31,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.getByName<ProcessResources>("processResources").apply {
|
tasks.named<ProcessResources>("processResources") {
|
||||||
filter<ReplaceTokens>("tokens" to mapOf(
|
filter<ReplaceTokens>("tokens" to mapOf(
|
||||||
"version" to project.property("version"),
|
"version" to project.property("version"),
|
||||||
"description" to project.property("description")
|
"description" to project.property("description")
|
||||||
@ -43,17 +43,17 @@ configurations.getByName("compile").extendsFrom(shade)
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// transitive = false, viabackwards-core because Guava is conflicting on runClient
|
// transitive = false, viabackwards-core because Guava is conflicting on runClient
|
||||||
shade("us.myles:viaversion:2.0.0-19w12b") { isTransitive = false }
|
shade("us.myles:viaversion:2.0.0-19w13b") { isTransitive = false }
|
||||||
shade("de.gerrygames:viarewind-core:1.4.0") { isTransitive = false }
|
shade("de.gerrygames:viarewind-core:1.4.0") { isTransitive = false }
|
||||||
shade("nl.matsv:viabackwards-core:3.0.0-19w11b") { isTransitive = false }
|
shade("nl.matsv:viabackwards-core:3.0.0-19w13b") { isTransitive = false }
|
||||||
|
|
||||||
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
|
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
|
||||||
|
|
||||||
minecraft("com.mojang:minecraft:19w12b")
|
minecraft("com.mojang:minecraft:19w13b")
|
||||||
mappings("net.fabricmc:yarn:19w12b.3")
|
mappings("net.fabricmc:yarn:19w13b.2")
|
||||||
modCompile("net.fabricmc:fabric-loader:0.3.7.109")
|
modCompile("net.fabricmc:fabric-loader:0.3.7.109")
|
||||||
|
|
||||||
modCompile("net.fabricmc:fabric:0.2.5.114")
|
modCompile("net.fabricmc:fabric:0.2.6.117")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
tasks.named<Jar>("jar") {
|
||||||
|
@ -63,9 +63,9 @@ public abstract class MixinMultiplayerScreen extends Screen {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "method_2540", at = @At("TAIL"))
|
@Inject(method = "init", at = @At("TAIL"))
|
||||||
private void onInitWidgets(CallbackInfo ci) {
|
private void onInit(CallbackInfo ci) {
|
||||||
protocolVersion = new TextFieldWidget(fontRenderer, this.screenWidth / 2 + 88, 13, 65, 15);
|
protocolVersion = new TextFieldWidget(font, this.width / 2 + 88, 13, 65, 15);
|
||||||
protocolVersion.method_1890(new VersionFormatFilter());
|
protocolVersion.method_1890(new VersionFormatFilter());
|
||||||
protocolVersion.setChangedListener((text) -> {
|
protocolVersion.setChangedListener((text) -> {
|
||||||
protocolVersion.setSuggestion(null);
|
protocolVersion.setSuggestion(null);
|
||||||
@ -101,9 +101,9 @@ public abstract class MixinMultiplayerScreen extends Screen {
|
|||||||
protocolVersion.setText(ProtocolVersion.isRegistered(clientSideVersion)
|
protocolVersion.setText(ProtocolVersion.isRegistered(clientSideVersion)
|
||||||
? ProtocolVersion.getProtocol(clientSideVersion).getName()
|
? ProtocolVersion.getProtocol(clientSideVersion).getName()
|
||||||
: Integer.toString(clientSideVersion));
|
: Integer.toString(clientSideVersion));
|
||||||
this.listeners.add(protocolVersion);
|
this.children.add(protocolVersion);
|
||||||
|
|
||||||
enableClientSideViaVersion = new ButtonWidget(this.screenWidth / 2 + 48, 13, 105, 15,
|
enableClientSideViaVersion = new ButtonWidget(this.width / 2 + 48, 13, 105, 15,
|
||||||
I18n.translate("gui.enable_client_side_button"), button ->
|
I18n.translate("gui.enable_client_side_button"), button ->
|
||||||
MinecraftClient.getInstance().openScreen(new YesNoScreen(
|
MinecraftClient.getInstance().openScreen(new YesNoScreen(
|
||||||
(answer, id) -> {
|
(answer, id) -> {
|
||||||
@ -129,18 +129,13 @@ public abstract class MixinMultiplayerScreen extends Screen {
|
|||||||
addButton(enableClientSideViaVersion);
|
addButton(enableClientSideViaVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "render",
|
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Screen;render(IIF)V"))
|
||||||
at = {
|
|
||||||
@At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Screen;render(IIF)V"),
|
|
||||||
@At(value = "INVOKE", target = "Lnet/minecraft/class_437;render(IIF)V") // Generated refmap doesn't have it
|
|
||||||
},
|
|
||||||
remap = false)
|
|
||||||
private void onRender(int int_1, int int_2, float float_1, CallbackInfo ci) {
|
private void onRender(int int_1, int int_2, float float_1, CallbackInfo ci) {
|
||||||
protocolVersion.render(int_1, int_2, float_1);
|
protocolVersion.render(int_1, int_2, float_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "update", at = @At("TAIL"))
|
@Inject(method = "tick", at = @At("TAIL"))
|
||||||
private void onUpdate(CallbackInfo ci) {
|
private void onTick(CallbackInfo ci) {
|
||||||
protocolVersion.tick();
|
protocolVersion.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1575,19 +1575,7 @@ public class Protocol1_8TO1_7_6_10 extends Protocol {
|
|||||||
packetWrapper.writeToBuffer(newPacketBuf);
|
packetWrapper.writeToBuffer(newPacketBuf);
|
||||||
PacketWrapper newWrapper = new PacketWrapper(0x17, newPacketBuf, packetWrapper.user());
|
PacketWrapper newWrapper = new PacketWrapper(0x17, newPacketBuf, packetWrapper.user());
|
||||||
newWrapper.passthrough(Type.STRING);
|
newWrapper.passthrough(Type.STRING);
|
||||||
final int[] length = new int[1];
|
newWrapper.write(Type.SHORT, (short) newPacketBuf.readableBytes());
|
||||||
newWrapper.read(new Type<Void>(Void.class) {
|
|
||||||
@Override
|
|
||||||
public Void read(ByteBuf byteBuf) {
|
|
||||||
length[0] = byteBuf.readableBytes();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(ByteBuf byteBuf, Void aVoid) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
newWrapper.write(Type.SHORT, (short) length[0]);
|
|
||||||
newWrapper.sendToServer(Protocol1_8TO1_7_6_10.class, true, true);
|
newWrapper.sendToServer(Protocol1_8TO1_7_6_10.class, true, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user