Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-10-03 08:41:05 +02:00
Update to 0.5.3, add inventory title tracking so we're working towards some of the inventory bugs with new ones.
Dieser Commit ist enthalten in:
Ursprung
0d0e1c16ea
Commit
e487eeb395
@ -1,4 +1,4 @@
|
|||||||
# ViaVersion 0.5.2
|
# ViaVersion 0.5.3
|
||||||
**Allows the connection of 1.9 clients to 1.8**
|
**Allows the connection of 1.9 clients to 1.8**
|
||||||
|
|
||||||
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
|
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
|
||||||
|
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<artifactId>ViaVersion</artifactId>
|
<artifactId>ViaVersion</artifactId>
|
||||||
<version>0.5.2</version>
|
<version>0.5.3</version>
|
||||||
<build>
|
<build>
|
||||||
<finalName>ViaVersion-${project.version}</finalName>
|
<finalName>ViaVersion-${project.version}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package us.myles.ViaVersion;
|
package us.myles.ViaVersion;
|
||||||
|
|
||||||
public class CancelException extends Exception{
|
public class CancelException extends Exception {
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ public class ConnectionInfo {
|
|||||||
private Object lastPacket;
|
private Object lastPacket;
|
||||||
private java.util.UUID UUID;
|
private java.util.UUID UUID;
|
||||||
private State state = State.HANDSHAKE;
|
private State state = State.HANDSHAKE;
|
||||||
|
private String openWindow;
|
||||||
private int protocol = 0;
|
private int protocol = 0;
|
||||||
private int compression = 0;
|
private int compression = 0;
|
||||||
private boolean active = true;
|
private boolean active = true;
|
||||||
@ -87,4 +88,16 @@ public class ConnectionInfo {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOpenWindow() {
|
||||||
|
return openWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenWindow(String openWindow) {
|
||||||
|
this.openWindow = openWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeWindow() {
|
||||||
|
this.openWindow = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,9 @@ public class IncomingTransformer {
|
|||||||
ItemSlotRewriter.rewrite1_9To1_8(input, output);
|
ItemSlotRewriter.rewrite1_9To1_8(input, output);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (packet == PacketType.PLAY_CLOSE_WINDOW_REQUEST) {
|
||||||
|
info.closeWindow();
|
||||||
|
}
|
||||||
if (packet == PacketType.PLAY_CLIENT_SETTINGS) {
|
if (packet == PacketType.PLAY_CLIENT_SETTINGS) {
|
||||||
String locale = PacketUtil.readString(input);
|
String locale = PacketUtil.readString(input);
|
||||||
PacketUtil.writeString(locale, output);
|
PacketUtil.writeString(locale, output);
|
||||||
|
@ -411,14 +411,23 @@ public class OutgoingTransformer {
|
|||||||
if (packet == PacketType.PLAY_OPEN_WINDOW) {
|
if (packet == PacketType.PLAY_OPEN_WINDOW) {
|
||||||
int windowId = input.readUnsignedByte();
|
int windowId = input.readUnsignedByte();
|
||||||
String type = readString(input);
|
String type = readString(input);
|
||||||
|
info.setOpenWindow(type);
|
||||||
String windowTitle = readString(input);
|
String windowTitle = readString(input);
|
||||||
|
|
||||||
output.writeByte(windowId);
|
output.writeByte(windowId);
|
||||||
writeString(type, output);
|
writeString(type, output);
|
||||||
writeString(fixJson(windowTitle), output);
|
writeString(fixJson(windowTitle), output);
|
||||||
|
int slots = input.readUnsignedByte();
|
||||||
|
if(type.equals("minecraft:brewing_stand")){
|
||||||
|
slots = slots + 1; // new slot
|
||||||
|
}
|
||||||
|
output.writeByte(slots);
|
||||||
output.writeBytes(input);
|
output.writeBytes(input);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (packet == PacketType.PLAY_CLOSE_WINDOW) {
|
||||||
|
info.closeWindow();
|
||||||
|
}
|
||||||
if (packet == PacketType.PLAY_SET_SLOT) {
|
if (packet == PacketType.PLAY_SET_SLOT) {
|
||||||
int windowId = input.readUnsignedByte();
|
int windowId = input.readUnsignedByte();
|
||||||
output.writeByte(windowId);
|
output.writeByte(windowId);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren