Fix client digging packet parsing

This commit is contained in:
themode 2020-09-28 18:27:28 +02:00
parent af9851c334
commit e96aebaaba
2 changed files with 2 additions and 2 deletions

View File

@ -674,7 +674,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
public void setInstance(Instance instance) {
Check.notNull(instance, "instance cannot be null!");
Check.stateCondition(!instance.isRegistered(),
"Instances need to be registered with InstanceManager#createInstanceContainer or InstanceManager#registerInstance");
"Instances need to be registered, please use InstanceManager#registerInstance or InstanceManager#registerSharedInstance");
if (this.instance != null) {
this.instance.removeEntity(this);

View File

@ -15,7 +15,7 @@ public class ClientPlayerDiggingPacket extends ClientPlayPacket {
public void read(BinaryReader reader) {
this.status = Status.values()[reader.readVarInt()];
this.blockPosition = reader.readBlockPosition();
this.blockFace = BlockFace.values()[reader.readVarInt()];
this.blockFace = BlockFace.values()[reader.readByte()];
}
public enum Status {