Compare commits

..
32 Commits
Author SHA1 Message Date
Myles fd0bd53826 Bump version to 0.4.6 2016-03-03 13:07:57 +00:00
Myles e11c8320f0 Merge pull request #83 from StamBoom/master
Fix unmount
2016-03-03 12:56:54 +00:00
Myles 624595e9f6 Merge pull request #84 from HugoDaBosss/patch-4
Fix animals appearing as babies instead of parents
2016-03-03 12:56:37 +00:00
HugoDaBosss cc813545d8 Formatting 2016-03-03 12:22:54 +01:00
HugoDaBosss e1ba6e07c2 Fix animals appearing as babies instead of parent 2016-03-03 12:20:19 +01:00
Mats 1bf49b1f0b Fix unmount 2016-03-03 12:18:23 +01:00
HugoDaBosss 5e34fda7e4 Merge pull request #4 from MylesIsCool/master
Merge from master
2016-03-03 12:17:06 +01:00
Myles aa70ab8b78 Extra line 2016-03-03 10:37:43 +00:00
Myles 186ba22dc8 Update README with chat, and change issue template 2016-03-03 10:37:10 +00:00
Myles b10aa30d9b Change error correction to use super, should restore default functionality to errors. 2016-03-03 10:24:01 +00:00
Myles 615b9f847c Merge pull request #77 from HugoDaBosss/patch-2
Don't send malformed JSON anymore, preventing kicks.
2016-03-03 10:04:54 +00:00
Myles 8f132fed14 Merge pull request #64 from HugoDaBosss/master
Fixed double placing sound and small packet finding optimization. (I suck at github)
2016-03-03 10:04:33 +00:00
HugoDaBosss 854e24f8fc More formatting 2016-03-03 10:47:22 +01:00
HugoDaBosss ff0544f29a Eclipse is changing my bracket markup x.x 2016-03-03 10:46:38 +01:00
HugoDaBosss 72ae12bc77 Don't send malformed JSON anymore, preventing kicks. 2016-03-03 10:44:57 +01:00
HugoDaBosss 29d2334ef0 Fixed bracket markup ;) 2016-03-03 10:09:38 +01:00
HugoDaBosss afb96c4878 Fixed double break sound 2016-03-03 10:06:24 +01:00
HugoDaBosss e4346611c9 Small optimization 2016-03-03 01:40:24 +01:00
BuildTools f15e11272a Merge branch 'master' of https://github.com/HugoDaBosss/ViaVersion 2016-03-03 01:37:25 +01:00
HugoDaBosss 8764d24a16 Merge pull request #3 from MylesIsCool/master
Update from Fork
2016-03-03 01:37:25 +01:00
Myles 86d543d700 Add new contributor, update version to 0.4.5 :) 2016-03-03 00:13:53 +00:00
Myles 99fd01c359 Merge pull request #63 from gigosaurus/patch-1
Fix player entity meta data
2016-03-03 00:12:03 +00:00
gigosaurus 573dcc10b1 Fix player entity meta data
I'm not 100% confident that what I'm doing here is correct, but looking at http://wiki.vg/Pre-release_protocol#Spawn_Player I think I'm doing it right.

fixes #58
2016-03-03 00:06:13 +00:00
Myles 3e30d989a0 Print out stack traces instead of throwing them move. 2016-03-02 23:20:57 +00:00
Myles fc00dd2b38 Merge pull request #56 from gigosaurus/master
Fix PLAY_USE_BED's old ID
2016-03-02 23:08:57 +00:00
gigosaurus 2e9987373d Fix PLAY_USE_BED's old ID 2016-03-02 22:16:58 +00:00
Myles 27c2f4c076 Bump version 2016-03-02 22:01:16 +00:00
Myles e9b61a8e91 Merge pull request #50 from Mystalion/awesome-metadata
Rewrite Metadata system to read the data from the bytebuf instead of
2016-03-02 20:57:33 +00:00
Paulomart 222dee6fda Rewrite Metadata system to read the data from the bytebuf instead of
using the last sent packet.
2016-03-02 21:39:37 +01:00
Myles e8cc25baad Should fix any ClosedConnection output 2016-03-02 20:19:47 +00:00
Myles 785f0664da Fix wither & add more debug info to missing metaindex 2016-03-02 19:42:14 +00:00
HugoDaBosss b6c2a46a86 Merge pull request #2 from MylesIsCool/master
Update From Original #2
2016-03-02 11:44:24 +01:00
12 changed files with 285 additions and 175 deletions

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
### What version of ViaVersion are you using? Type /ver viaversion
### What version of Spigot are you using? Type /ver
### What plugins are you using? /plugins
### How does this error happen? login? using an item?
### Is there an error in the console? Use pastebin.com. Is there a kick message?
+10 -5
View File
@@ -1,4 +1,4 @@
# ViaVersion 0.4.3
# ViaVersion 0.4.6
**Allows the connection of 1.8 clients to 1.9**
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
@@ -28,12 +28,15 @@ Contributors:
--------
**Myself** (harhar)
**Matsv/StamBoom**
**HugoDaBosss**
**SanderGielisse**
**Paulomart**
**gigosaurus**
**Chat: ** https://gitter.im/MylesIsCool/ViaVersion
We use it to collaborate and solve errors, sign in with github.
License:
--------
@@ -41,4 +44,6 @@ License:
You may modify this work, all rights are still owned by myself excluding any files in the spacebase package as they belong to the respected contributors. Please credit the original author (myself) when forking etc. (or if it helped you understand the new protocol or netty!)
Thanks!
Thanks!
@@ -47,9 +47,7 @@ public class ViaDecodeHandler extends ByteToMessageDecoder {
if (!(cause.getCause().getCause() instanceof CancelException)) {
if (!(cause.getCause() instanceof CancelException)) {
if (!(cause instanceof CancelException)) {
System.out.println("throwing");
if (cause instanceof Exception)
throw (Exception) cause;
super.exceptionCaught(ctx, cause);
}
}
}
@@ -10,6 +10,7 @@ import us.myles.ViaVersion.util.PacketUtil;
import us.myles.ViaVersion.util.ReflectionUtil;
import java.lang.reflect.Constructor;
import java.nio.channels.ClosedChannelException;
public class ViaEncodeHandler extends MessageToByteEncoder {
private final ConnectionInfo info;
@@ -74,9 +75,7 @@ public class ViaEncodeHandler extends MessageToByteEncoder {
if (!(cause.getCause().getCause() instanceof CancelException)) {
if (!(cause.getCause() instanceof CancelException)) {
if (!(cause instanceof CancelException)) {
System.out.println("throwing");
if (cause instanceof Exception)
throw (Exception) cause;
super.exceptionCaught(ctx, cause);
}
}
}
@@ -88,6 +88,8 @@ public enum MetaIndex {
WITHER_TARGET2(Wither.class, 18, Type.Int, 12, NewType.VarInt),
WITHER_TARGET3(Wither.class, 19, Type.Int, 13, NewType.VarInt),
WITHER_INVULN_TIME(Wither.class, 20, Type.Int, 14, NewType.VarInt),
// wither skull
WITHERSKULL_INVULN(WitherSkull.class, 10, Type.Byte, 5, NewType.Boolean),
// guardian
GUARDIAN_INFO(Guardian.class, 16, Type.Int, 11, NewType.Byte),
GUARDIAN_TARGET(Guardian.class, 17, Type.Int, 12, NewType.VarInt),
@@ -0,0 +1,186 @@
package us.myles.ViaVersion.metadata;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import org.bukkit.entity.EntityType;
import org.bukkit.util.EulerAngle;
import org.bukkit.util.Vector;
import io.netty.buffer.ByteBuf;
import us.myles.ViaVersion.util.PacketUtil;
public class MetadataRewriter {
public static void writeMetadata1_9(EntityType type, List<Entry> list, ByteBuf output) {
short id = -1;
int data = -1;
Iterator<Entry> iterator = list.iterator();
while (iterator.hasNext()) {
Entry entry = iterator.next(); //
MetaIndex metaIndex = entry.index;
try {
if (metaIndex.getNewType() != NewType.Discontinued) {
if (metaIndex.getNewType() != NewType.BlockID || id != -1 && data == -1 || id == -1 && data != -1) { // block ID is only written if we have both parts
output.writeByte(metaIndex.getNewIndex());
output.writeByte(metaIndex.getNewType().getTypeID());
}
Object value = entry.value;
switch (metaIndex.getNewType()) {
case Byte:
// convert from int, byte
if (metaIndex.getOldType() == Type.Byte) {
output.writeByte(((Byte) value).byteValue());
}
if (metaIndex.getOldType() == Type.Int) {
output.writeByte(((Integer) value).byteValue());
}
break;
case OptUUID:
String owner = (String) value;
UUID toWrite = null;
if (owner.length() != 0) {
try {
toWrite = UUID.fromString(owner);
} catch (Exception ignored) {
}
}
output.writeBoolean(toWrite != null);
if (toWrite != null)
PacketUtil.writeUUID((UUID) toWrite, output);
break;
case BlockID:
// if we have both sources :))
if (metaIndex.getOldType() == Type.Byte) {
data = ((Byte) value).byteValue();
}
if (metaIndex.getOldType() == Type.Short) {
id = ((Short) value).shortValue();
}
if (id != -1 && data != -1) {
int combined = id << 4 | data;
data = -1;
id = -1;
PacketUtil.writeVarInt(combined, output);
}
break;
case VarInt:
// convert from int, short, byte
if (metaIndex.getOldType() == Type.Byte) {
PacketUtil.writeVarInt(((Byte) value).intValue(), output);
}
if (metaIndex.getOldType() == Type.Short) {
PacketUtil.writeVarInt(((Short) value).intValue(), output);
}
if (metaIndex.getOldType() == Type.Int) {
PacketUtil.writeVarInt(((Integer) value).intValue(), output);
}
break;
case Float:
output.writeFloat(((Float) value).floatValue());
break;
case String:
PacketUtil.writeString((String) value, output);
break;
case Boolean:
if(metaIndex == MetaIndex.AGEABLE_AGE)
output.writeBoolean(((Byte) value).byteValue() < 0);
else
output.writeBoolean(((Byte) value).byteValue() != 0);
break;
case Slot:
PacketUtil.writeItem(value, output);
break;
case Position:
Vector vector = (Vector) value;
output.writeInt((int) vector.getX());
output.writeInt((int) vector.getY());
output.writeInt((int) vector.getZ());
break;
case Vector3F:
EulerAngle angle = (EulerAngle) value;
output.writeFloat((float) angle.getX());
output.writeFloat((float) angle.getY());
output.writeFloat((float) angle.getZ());
break;
default:
System.out.println("[Out] Unhandled MetaDataType: " + metaIndex.getNewType());
break;
}
}
} catch (Exception e) {
if (type != null) {
System.out.println("An error occurred with entity meta data for " + type);
if (metaIndex != null) {
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
}
}
e.printStackTrace();
}
}
output.writeByte(255);
}
public static List<Entry> readMetadata1_8(EntityType entityType, ByteBuf buf) {
List<Entry> entries = new ArrayList<>();
byte item;
while ((item = buf.readByte()) != 127) {
Type type = Type.byId((item & 0xE0) >> 5);
int id = item & 0x1F;
MetaIndex index = MetaIndex.getIndex(entityType, id);
switch (type) {
case Byte:
entries.add(new Entry(index, buf.readByte()));
break;
case Short:
entries.add(new Entry(index, buf.readShort()));
break;
case Int:
entries.add(new Entry(index, buf.readInt()));
break;
case Float:
entries.add(new Entry(index, buf.readFloat()));
break;
case String:
entries.add(new Entry(index, PacketUtil.readString(buf)));
break;
case Slot:
entries.add(new Entry(index, PacketUtil.readItem(buf)));
break;
case Position: {
int x = buf.readInt();
int y = buf.readInt();
int z = buf.readInt();
entries.add(new Entry(index, new Vector(x, y, z)));
break;
}
case Rotation: {
float x = buf.readFloat();
float y = buf.readFloat();
float z = buf.readFloat();
entries.add(new Entry(index, new EulerAngle(x, y, z)));
break;
}
default:
System.out.println("[Out] Unhandled MetaDataType: " + type);
break;
}
}
return entries;
}
public static class Entry {
private MetaIndex index;
private Object value;
private Entry(MetaIndex index, Object value) {
this.index = index;
this.value = value;
}
}
}
@@ -18,4 +18,8 @@ public enum Type {
public int getTypeID() {
return typeID;
}
public static Type byId(int id) {
return values()[id];
}
}
@@ -96,7 +96,7 @@ public enum PacketType {
PLAY_COMBAT_EVENT(State.PLAY, Direction.OUTGOING, 0x42, 0x2C),
PLAY_PLAYER_LIST_ITEM(State.PLAY, Direction.OUTGOING, 0x38, 0x2D),
PLAY_PLAYER_POSITION_LOOK(State.PLAY, Direction.OUTGOING, 0x08, 0x2E),
PLAY_USE_BED(State.PLAY, Direction.OUTGOING, 0x2F, 0x2F),
PLAY_USE_BED(State.PLAY, Direction.OUTGOING, 0x0A, 0x2F),
PLAY_DESTROY_ENTITIES(State.PLAY, Direction.OUTGOING, 0x13, 0x30),
PLAY_REMOVE_ENTITY_EFFECT(State.PLAY, Direction.OUTGOING, 0x1E, 0x31),
PLAY_RESOURCE_PACK_SEND(State.PLAY, Direction.OUTGOING, 0x48, 0x32),
@@ -170,7 +170,7 @@ public enum PacketType {
if(id == -1)
return null;
for (PacketType pt : values()) {
if (pt.getNewPacketID() == id && id != -1
if (pt.getNewPacketID() == id
&& pt.getState() == state
&& pt.getDirection() == direction)
return pt;
@@ -182,7 +182,7 @@ public enum PacketType {
if(id == -1)
return null;
for (PacketType pt : values()) {
if (pt.getPacketID() == id && id != -1
if (pt.getPacketID() == id
&& pt.getState() == state
&& pt.getDirection() == direction)
return pt;
@@ -252,11 +252,13 @@ public enum SoundEffect {
private String name;
private String newname;
private SoundCategory cat;
private boolean breaksound;
SoundEffect(String name, String newname, SoundCategory cat) {
this.cat = cat;
this.newname = newname;
this.name = name;
this.breaksound = name.startsWith("dig.");
}
public static SoundEffect getByName(String name) {
@@ -279,5 +281,9 @@ public enum SoundEffect {
public SoundCategory getCategory() {
return cat;
}
public boolean isBreakPlaceSound() {
return breaksound;
}
}
@@ -2,17 +2,19 @@ package us.myles.ViaVersion.transformers;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.netty.buffer.ByteBuf;
import org.bukkit.entity.EntityType;
import org.json.simple.parser.JSONParser;
import org.spacehq.mc.protocol.data.game.chunk.Column;
import org.spacehq.mc.protocol.util.NetUtil;
import us.myles.ViaVersion.CancelException;
import us.myles.ViaVersion.ConnectionInfo;
import us.myles.ViaVersion.ViaVersionPlugin;
import us.myles.ViaVersion.api.ViaVersion;
import us.myles.ViaVersion.metadata.MetaIndex;
import us.myles.ViaVersion.metadata.NewType;
import us.myles.ViaVersion.metadata.Type;
import us.myles.ViaVersion.metadata.MetadataRewriter;
import us.myles.ViaVersion.packets.PacketType;
import us.myles.ViaVersion.packets.State;
import us.myles.ViaVersion.sounds.SoundEffect;
@@ -21,7 +23,6 @@ import us.myles.ViaVersion.util.PacketUtil;
import us.myles.ViaVersion.util.ReflectionUtil;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import static us.myles.ViaVersion.util.PacketUtil.*;
@@ -33,6 +34,7 @@ public class OutgoingTransformer {
private boolean cancel = false;
private Map<Integer, UUID> uuidMap = new HashMap<Integer, UUID>();
private Map<Integer, EntityType> clientEntityTypes = new HashMap<Integer, EntityType>();
private Map<Integer, Integer> vehicleMap = new HashMap<>();
public OutgoingTransformer(ConnectionInfo info) {
this.info = info;
@@ -62,6 +64,11 @@ public class OutgoingTransformer {
int catid = 0;
String newname = name;
if (effect != null) {
if(effect.isBreakPlaceSound()) {
input.readBytes(input.readableBytes());
output.clear();
return;
}
catid = effect.getCategory().getId();
newname = effect.getNewName();
}
@@ -76,8 +83,17 @@ public class OutgoingTransformer {
if (!lead) {
output.clear();
writeVarInt(PacketType.PLAY_SET_PASSENGERS.getNewPacketID(), output);
writeVarInt(vehicle, output);
writeVarIntArray(Collections.singletonList(passenger), output);
if (vehicle == -1) {
if (!vehicleMap.containsKey(passenger))
throw new CancelException();
vehicle = vehicleMap.remove(passenger);
writeVarInt(vehicle,output);
writeVarIntArray(Collections.<Integer>emptyList(), output);
} else{
writeVarInt(vehicle, output);
writeVarIntArray(Collections.singletonList(passenger), output);
vehicleMap.put(passenger,vehicle);
}
return;
}
output.writeInt(passenger);
@@ -211,15 +227,7 @@ public class OutgoingTransformer {
int id = PacketUtil.readVarInt(input);
PacketUtil.writeVarInt(id, output);
try {
List dw = ReflectionUtil.get(info.getLastPacket(), "b", List.class);
// get entity via entityID, not preferred but we need it.
transformMetadata(id, dw, output);
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
transformMetadata(id, input, output);
return;
}
@@ -358,16 +366,8 @@ public class OutgoingTransformer {
output.writeShort(vY);
short vZ = input.readShort();
output.writeShort(vZ);
try {
Object dataWatcher = ReflectionUtil.get(info.getLastPacket(), "l", ReflectionUtil.nms("DataWatcher"));
transformMetadata(id, dataWatcher, output);
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
transformMetadata(id, input, output);
return;
}
if (packet == PacketType.PLAY_UPDATE_SIGN) {
@@ -411,16 +411,11 @@ public class OutgoingTransformer {
output.writeByte(pitch);
byte yaw = input.readByte();
output.writeByte(yaw);
try {
Object dataWatcher = ReflectionUtil.get(info.getLastPacket(), "i", ReflectionUtil.nms("DataWatcher"));
transformMetadata(id, dataWatcher, output);
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
// next field is Current Item, this was removed in 1.9 so we'll ignore it
input.readShort();
transformMetadata(id, input, output);
return;
}
@@ -511,140 +506,25 @@ public class OutgoingTransformer {
if (line.startsWith("\""))
line = "{\"text\":" + line + "}";
}
try {
new JSONParser().parse(line);
}
catch (org.json.simple.parser.ParseException e) {
System.out.println("Invalid JSON String: \"" + line + "\" Please report this issue to the ViaVersion Github!");
return "{\"text\":\"\"}";
}
return line;
}
private void transformMetadata(int entityID, Object dw, ByteBuf output) throws CancelException {
// get entity
try {
transformMetadata(entityID, (List) ReflectionUtil.invoke(dw, "b"), output);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
private void transformMetadata(int entityID, List dw, ByteBuf output) throws CancelException {
private void transformMetadata(int entityID, ByteBuf input, ByteBuf output) throws CancelException {
EntityType type = clientEntityTypes.get(entityID);
if (type == null) {
System.out.println("Unable to get entity for ID: " + entityID);
output.writeByte(255);
return;
}
if (dw != null) {
short id = -1;
int data = -1;
Iterator iterator = dw.iterator();
while (iterator.hasNext()) {
Object watchableObj = iterator.next(); //
MetaIndex metaIndex = null;
try {
metaIndex = MetaIndex.getIndex(type, (int) ReflectionUtil.invoke(watchableObj, "a"));
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
try {
if (metaIndex.getNewType() != NewType.Discontinued) {
if (metaIndex.getNewType() != NewType.BlockID || id != -1 && data == -1 || id == -1 && data != -1) { // block ID is only written if we have both parts
output.writeByte(metaIndex.getNewIndex());
output.writeByte(metaIndex.getNewType().getTypeID());
}
Object value = ReflectionUtil.invoke(watchableObj, "b");
switch (metaIndex.getNewType()) {
case Byte:
// convert from int, byte
if (metaIndex.getOldType() == Type.Byte) {
output.writeByte(((Byte) value).byteValue());
}
if (metaIndex.getOldType() == Type.Int) {
output.writeByte(((Integer) value).byteValue());
}
break;
case OptUUID:
String owner = (String) value;
UUID toWrite = null;
if (owner.length() != 0) {
try {
toWrite = UUID.fromString(owner);
} catch (Exception ignored) {
}
}
output.writeBoolean(toWrite != null);
if (toWrite != null)
PacketUtil.writeUUID((UUID) toWrite, output);
break;
case BlockID:
// if we have both sources :))
if (metaIndex.getOldType() == Type.Byte) {
data = ((Byte) value).byteValue();
}
if (metaIndex.getOldType() == Type.Short) {
id = ((Short) value).shortValue();
}
if (id != -1 && data != -1) {
int combined = id << 4 | data;
data = -1;
id = -1;
PacketUtil.writeVarInt(combined, output);
}
break;
case VarInt:
// convert from int, short, byte
if (metaIndex.getOldType() == Type.Byte) {
PacketUtil.writeVarInt(((Byte) value).intValue(), output);
}
if (metaIndex.getOldType() == Type.Short) {
PacketUtil.writeVarInt(((Short) value).intValue(), output);
}
if (metaIndex.getOldType() == Type.Int) {
PacketUtil.writeVarInt(((Integer) value).intValue(), output);
}
break;
case Float:
output.writeFloat(((Float) value).floatValue());
break;
case String:
PacketUtil.writeString((String) value, output);
break;
case Boolean:
output.writeBoolean(((Byte) value).byteValue() != 0);
break;
case Slot:
PacketUtil.writeItem(value, output);
break;
case Position:
output.writeInt((int) ReflectionUtil.invoke(value, "getX"));
output.writeInt((int) ReflectionUtil.invoke(value, "getY"));
output.writeInt((int) ReflectionUtil.invoke(value, "getZ"));
break;
case Vector3F:
output.writeFloat((float) ReflectionUtil.invoke(value, "getX"));
output.writeFloat((float) ReflectionUtil.invoke(value, "getY"));
output.writeFloat((float) ReflectionUtil.invoke(value, "getZ"));
}
}
} catch (Exception e) {
if (type != null) {
System.out.println("An error occurred with entity meta data for " + type);
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
}
e.printStackTrace();
}
}
}
output.writeByte(255);
List<MetadataRewriter.Entry> list = MetadataRewriter.readMetadata1_8(type, input);
MetadataRewriter.writeMetadata1_9(type, list, output);
}
@@ -373,6 +373,26 @@ public class PacketUtil {
}
}
public static Object readItem(ByteBuf output) {
try {
Class<?> serializer = ReflectionUtil.nms("PacketDataSerializer");
Object init = serializer.getDeclaredConstructor(ByteBuf.class).newInstance(output);
Method toCall = init.getClass().getDeclaredMethod("i");
return toCall.invoke(init);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
public static long[] readBlockPosition(ByteBuf buf) {
long val = buf.readLong();
long x = (val >> 38); // signed
+1 -1
View File
@@ -1,6 +1,6 @@
name: ViaVersion
main: us.myles.ViaVersion.ViaVersionPlugin
author: _MylesC
version: 0.4.3
version: 0.4.6
load: startup
loadbefore: [ProtocolLib, ProxyPipe]