3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-25 07:40:08 +01:00

Update version to 0.3, also fix issue with teams haha

Dieser Commit ist enthalten in:
Myles 2016-02-29 20:35:50 +00:00
Ursprung e2de17e221
Commit e885a1cec2
5 geänderte Dateien mit 14 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -1,9 +1,9 @@
# ViaVersion 0.2
# ViaVersion 0.3
**Allows the connection of 1.8 clients to 1.9**
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
**Don't use late bind**
**Don't use late bind nor ProtocolLib**
**As of this point it doesn't have everything, I need to fix:**

Datei anzeigen

@ -24,6 +24,9 @@ public class Core extends JavaPlugin {
try {
injectPacketHandler();
} catch (Exception e) {
if(Bukkit.getPluginManager().getPlugin("ProtocolLib") != null){
System.out.println("This plugin is not compatible with protocol lib.");
}
System.out.println("Unable to inject handlers, are you on 1.8? ");
e.printStackTrace();
}

Datei anzeigen

@ -171,7 +171,10 @@ public enum MetaIndex {
public static MetaIndex getIndex(EntityType type, int index) {
Class<? extends org.bukkit.entity.Entity> entityClass = type.getEntityClass();
if(entityClass == null){
System.out.println("Could not get entity class for " + type);
return null;
}
for (MetaIndex mi : MetaIndex.values()) {
if (mi.getIndex() == index) {
if (mi.getApplicableClass().isAssignableFrom(entityClass) ||

Datei anzeigen

@ -19,6 +19,7 @@ import us.myles.ViaVersion.packets.State;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.Charset;
import java.util.*;
public class OutgoingTransformer {
@ -45,7 +46,7 @@ public class OutgoingTransformer {
if (packet == null) {
throw new RuntimeException("Outgoing Packet not found? " + packetID + " State: " + info.getState() + " Version: " + info.getProtocol());
}
// if (packet != PacketType.PLAY_CHUNK_DATA && packet != PacketType.PLAY_KEEP_ALIVE && packet != PacketType.PLAY_TIME_UPDATE && !packet.name().toLowerCase().contains("entity"))
// if (packet != PacketType.PLAY_CHUNK_DATA && packet != PacketType.PLAY_KEEP_ALIVE && packet != PacketType.PLAY_TIME_UPDATE && (!packet.name().toLowerCase().contains("move") && !packet.name().contains("look")))
// System.out.println("Packet Type: " + packet + " Original ID: " + packetID + " State:" + info.getState());
if (packet.getPacketID() != -1) {
packetID = packet.getNewPacketID();
@ -334,7 +335,7 @@ public class OutgoingTransformer {
output.writeByte(input.readByte());
PacketUtil.writeString(PacketUtil.readString(input), output);
PacketUtil.readString(input); // collission rule :)
PacketUtil.writeString("", output); // collission rule :)
}
output.writeBytes(input);
return;

Datei anzeigen

@ -1,4 +1,4 @@
name: ViaVersion
main: us.myles.ViaVersion.Core
author: _MylesC
version: 0.2
version: 0.3