mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Add new PARTICLE MetadataType
This commit is contained in:
parent
798265e509
commit
e34c31e7a9
3 changed files with 9 additions and 1 deletions
|
@ -146,6 +146,7 @@ public class MagicValues {
|
|||
register(MetadataType.OPTIONAL_UUID, 12);
|
||||
register(MetadataType.BLOCK_STATE, 13);
|
||||
register(MetadataType.NBT_TAG, 14);
|
||||
register(MetadataType.PARTICLE, 15);
|
||||
|
||||
register(HandshakeIntent.STATUS, 1);
|
||||
register(HandshakeIntent.LOGIN, 2);
|
||||
|
|
|
@ -15,5 +15,6 @@ public enum MetadataType {
|
|||
BLOCK_FACE,
|
||||
OPTIONAL_UUID,
|
||||
BLOCK_STATE,
|
||||
NBT_TAG;
|
||||
NBT_TAG,
|
||||
PARTICLE;
|
||||
}
|
||||
|
|
|
@ -231,6 +231,9 @@ public class NetUtil {
|
|||
case NBT_TAG:
|
||||
value = readNBT(in);
|
||||
break;
|
||||
case PARTICLE:
|
||||
value = readParticle(in);
|
||||
break;
|
||||
default:
|
||||
throw new IOException("Unknown metadata type id: " + typeId);
|
||||
}
|
||||
|
@ -302,6 +305,9 @@ public class NetUtil {
|
|||
case NBT_TAG:
|
||||
writeNBT(out, (CompoundTag) meta.getValue());
|
||||
break;
|
||||
case PARTICLE:
|
||||
writeParticle(out, (Particle) meta.getValue());
|
||||
break;
|
||||
default:
|
||||
throw new IOException("Unknown metadata type: " + meta.getType());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue