Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e885a1cec2 | ||
|
|
e2de17e221 | ||
|
|
5738a992e5 |
No files matched your search
@@ -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:**
|
||||
|
||||
|
||||
@@ -24,7 +24,10 @@ public class Core extends JavaPlugin {
|
||||
try {
|
||||
injectPacketHandler();
|
||||
} catch (Exception e) {
|
||||
System.out.println("Unable to inject handlers, are you on 1.8?");
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) ||
|
||||
|
||||
@@ -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();
|
||||
@@ -317,7 +318,7 @@ public class OutgoingTransformer {
|
||||
PacketUtil.writeVarInt(damage, output);
|
||||
byte scale = input.readByte();
|
||||
output.writeByte(scale);
|
||||
input.readBoolean();
|
||||
output.writeBoolean(true);
|
||||
output.writeBytes(input);
|
||||
return;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ViaVersion
|
||||
main: us.myles.ViaVersion.Core
|
||||
author: _MylesC
|
||||
version: 0.2
|
||||
version: 0.3
|
||||
Reference in new issue
Block a user