mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-26 06:24:54 +02:00
Fix client digging packet parsing
This commit is contained in:
parent
af9851c334
commit
e96aebaaba
|
@ -674,7 +674,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
||||||
public void setInstance(Instance instance) {
|
public void setInstance(Instance instance) {
|
||||||
Check.notNull(instance, "instance cannot be null!");
|
Check.notNull(instance, "instance cannot be null!");
|
||||||
Check.stateCondition(!instance.isRegistered(),
|
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) {
|
if (this.instance != null) {
|
||||||
this.instance.removeEntity(this);
|
this.instance.removeEntity(this);
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class ClientPlayerDiggingPacket extends ClientPlayPacket {
|
||||||
public void read(BinaryReader reader) {
|
public void read(BinaryReader reader) {
|
||||||
this.status = Status.values()[reader.readVarInt()];
|
this.status = Status.values()[reader.readVarInt()];
|
||||||
this.blockPosition = reader.readBlockPosition();
|
this.blockPosition = reader.readBlockPosition();
|
||||||
this.blockFace = BlockFace.values()[reader.readVarInt()];
|
this.blockFace = BlockFace.values()[reader.readByte()];
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Status {
|
public enum Status {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user