public abstract class BaseBedrockCodecHelper extends Object implements BedrockCodecHelper
| Modifier and Type | Field and Description |
|---|---|
protected DefinitionRegistry<BlockDefinition> |
blockDefinitions |
protected EntityDataTypeMap |
entityData |
protected TypeMap<Class<?>> |
gameRuleType |
protected DefinitionRegistry<ItemDefinition> |
itemDefinitions |
protected static InternalLogger |
log |
| Constructor and Description |
|---|
BaseBedrockCodecHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
isAir(ItemDefinition definition) |
AnimationData |
readAnimationData(ByteBuf buffer) |
<T> void |
readArray(ByteBuf buffer,
Collection<T> array,
Function<ByteBuf,T> function) |
<T> void |
readArray(ByteBuf buffer,
Collection<T> array,
ToLongFunction<ByteBuf> lengthReader,
BiFunction<ByteBuf,BedrockCodecHelper,T> function) |
<T> T[] |
readArray(ByteBuf buffer,
T[] array,
BiFunction<ByteBuf,BedrockCodecHelper,T> function) |
<T> T[] |
readArray(ByteBuf buffer,
T[] array,
Function<ByteBuf,T> function) |
org.cloudburstmc.math.vector.Vector3i |
readBlockPosition(ByteBuf buffer) |
float |
readByteAngle(ByteBuf buffer) |
byte[] |
readByteArray(ByteBuf buffer) |
ByteBuf |
readByteBuf(ByteBuf buffer) |
void |
readEntityProperties(ByteBuf buffer,
EntityProperties properties) |
void |
readExperiments(ByteBuf buffer,
List<ExperimentData> experiments) |
protected ImageData |
readImage(ByteBuf buffer) |
boolean |
readInventoryActions(ByteBuf buffer,
List<InventoryActionData> actions) |
ItemStackRequest |
readItemStackRequest(ByteBuf buffer) |
void |
readItemUse(ByteBuf buffer,
InventoryTransactionPacket packet) |
SerializedSkin |
readSkin(ByteBuf buffer) |
protected InventorySource |
readSource(ByteBuf buffer) |
String |
readString(ByteBuf buffer) |
StructureSettings |
readStructureSettings(ByteBuf buffer) |
<T> T |
readTag(ByteBuf buffer,
Class<T> expected) |
<T> T |
readTagLE(ByteBuf buffer,
Class<T> expected) |
UUID |
readUuid(ByteBuf buffer) |
org.cloudburstmc.math.vector.Vector2f |
readVector2f(ByteBuf buffer) |
org.cloudburstmc.math.vector.Vector3f |
readVector3f(ByteBuf buffer) |
org.cloudburstmc.math.vector.Vector3i |
readVector3i(ByteBuf buffer) |
protected void |
writeAnimationData(ByteBuf buffer,
AnimationData animation) |
<T> void |
writeArray(ByteBuf buffer,
Collection<T> array,
BiConsumer<ByteBuf,T> biConsumer) |
<T> void |
writeArray(ByteBuf buffer,
Collection<T> array,
ObjIntConsumer<ByteBuf> lengthWriter,
TriConsumer<ByteBuf,BedrockCodecHelper,T> consumer) |
<T> void |
writeArray(ByteBuf buffer,
T[] array,
BiConsumer<ByteBuf,T> biConsumer) |
<T> void |
writeArray(ByteBuf buffer,
T[] array,
TriConsumer<ByteBuf,BedrockCodecHelper,T> consumer) |
void |
writeBlockPosition(ByteBuf buffer,
org.cloudburstmc.math.vector.Vector3i blockPosition) |
void |
writeByteAngle(ByteBuf buffer,
float angle) |
void |
writeByteArray(ByteBuf buffer,
byte[] bytes) |
void |
writeByteBuf(ByteBuf buffer,
ByteBuf toWrite) |
void |
writeEntityProperties(ByteBuf buffer,
EntityProperties properties) |
void |
writeExperiments(ByteBuf buffer,
List<ExperimentData> experiments) |
protected void |
writeImage(ByteBuf buffer,
ImageData image) |
void |
writeInventoryActions(ByteBuf buffer,
List<InventoryActionData> actions,
boolean hasNetworkIds) |
void |
writeItemStackRequest(ByteBuf buffer,
ItemStackRequest request) |
void |
writeItemUse(ByteBuf buffer,
InventoryTransactionPacket packet) |
void |
writeSkin(ByteBuf buffer,
SerializedSkin skin) |
protected void |
writeSource(ByteBuf buffer,
InventorySource inventorySource) |
void |
writeString(ByteBuf buffer,
String string) |
void |
writeStructureSettings(ByteBuf buffer,
StructureSettings settings) |
void |
writeTag(ByteBuf buffer,
Object tag) |
void |
writeTagLE(ByteBuf buffer,
Object tag) |
void |
writeUuid(ByteBuf buffer,
UUID uuid) |
void |
writeVector2f(ByteBuf buffer,
org.cloudburstmc.math.vector.Vector2f vector2f) |
void |
writeVector3f(ByteBuf buffer,
org.cloudburstmc.math.vector.Vector3f vector3f) |
void |
writeVector3i(ByteBuf buffer,
org.cloudburstmc.math.vector.Vector3i vector3i) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlockDefinitions, getItemDefinitions, readArray, readCommandEnum, readCommandOrigin, readEntityData, readEntityLink, readGameRule, readItem, readItemInstance, readNetItem, readOptional, readTag, readTagLE, setBlockDefinitions, setItemDefinitions, writeArray, writeCommandEnum, writeCommandOrigin, writeEntityData, writeEntityLink, writeGameRule, writeItem, writeItemInstance, writeNetItem, writeOptionalprotected static final InternalLogger log
protected final EntityDataTypeMap entityData
protected DefinitionRegistry<ItemDefinition> itemDefinitions
protected DefinitionRegistry<BlockDefinition> blockDefinitions
protected static boolean isAir(ItemDefinition definition)
public byte[] readByteArray(ByteBuf buffer)
readByteArray in interface BedrockCodecHelperpublic void writeByteArray(ByteBuf buffer, byte[] bytes)
writeByteArray in interface BedrockCodecHelperpublic ByteBuf readByteBuf(ByteBuf buffer)
readByteBuf in interface BedrockCodecHelperpublic void writeByteBuf(ByteBuf buffer, ByteBuf toWrite)
writeByteBuf in interface BedrockCodecHelperpublic String readString(ByteBuf buffer)
readString in interface BedrockCodecHelperpublic void writeString(ByteBuf buffer, String string)
writeString in interface BedrockCodecHelperpublic UUID readUuid(ByteBuf buffer)
readUuid in interface BedrockCodecHelperpublic void writeUuid(ByteBuf buffer, UUID uuid)
writeUuid in interface BedrockCodecHelperpublic org.cloudburstmc.math.vector.Vector3f readVector3f(ByteBuf buffer)
readVector3f in interface BedrockCodecHelperpublic void writeVector3f(ByteBuf buffer, org.cloudburstmc.math.vector.Vector3f vector3f)
writeVector3f in interface BedrockCodecHelperpublic org.cloudburstmc.math.vector.Vector2f readVector2f(ByteBuf buffer)
readVector2f in interface BedrockCodecHelperpublic void writeVector2f(ByteBuf buffer, org.cloudburstmc.math.vector.Vector2f vector2f)
writeVector2f in interface BedrockCodecHelperpublic org.cloudburstmc.math.vector.Vector3i readVector3i(ByteBuf buffer)
readVector3i in interface BedrockCodecHelperpublic void writeVector3i(ByteBuf buffer, org.cloudburstmc.math.vector.Vector3i vector3i)
writeVector3i in interface BedrockCodecHelperpublic float readByteAngle(ByteBuf buffer)
readByteAngle in interface BedrockCodecHelperpublic void writeByteAngle(ByteBuf buffer, float angle)
writeByteAngle in interface BedrockCodecHelperpublic org.cloudburstmc.math.vector.Vector3i readBlockPosition(ByteBuf buffer)
readBlockPosition in interface BedrockCodecHelperpublic void writeBlockPosition(ByteBuf buffer, org.cloudburstmc.math.vector.Vector3i blockPosition)
writeBlockPosition in interface BedrockCodecHelperpublic <T> void readArray(ByteBuf buffer, Collection<T> array, ToLongFunction<ByteBuf> lengthReader, BiFunction<ByteBuf,BedrockCodecHelper,T> function)
readArray in interface BedrockCodecHelperpublic <T> void writeArray(ByteBuf buffer, Collection<T> array, ObjIntConsumer<ByteBuf> lengthWriter, TriConsumer<ByteBuf,BedrockCodecHelper,T> consumer)
writeArray in interface BedrockCodecHelperpublic <T> T[] readArray(ByteBuf buffer, T[] array, BiFunction<ByteBuf,BedrockCodecHelper,T> function)
readArray in interface BedrockCodecHelperpublic <T> void writeArray(ByteBuf buffer, T[] array, TriConsumer<ByteBuf,BedrockCodecHelper,T> consumer)
writeArray in interface BedrockCodecHelperpublic <T> void readArray(ByteBuf buffer, Collection<T> array, Function<ByteBuf,T> function)
readArray in interface BedrockCodecHelperpublic <T> void writeArray(ByteBuf buffer, Collection<T> array, BiConsumer<ByteBuf,T> biConsumer)
writeArray in interface BedrockCodecHelperpublic <T> T[] readArray(ByteBuf buffer, T[] array, Function<ByteBuf,T> function)
readArray in interface BedrockCodecHelperpublic <T> void writeArray(ByteBuf buffer, T[] array, BiConsumer<ByteBuf,T> biConsumer)
writeArray in interface BedrockCodecHelperpublic <T> T readTag(ByteBuf buffer, Class<T> expected)
readTag in interface BedrockCodecHelperpublic void writeTag(ByteBuf buffer, Object tag)
writeTag in interface BedrockCodecHelperpublic <T> T readTagLE(ByteBuf buffer, Class<T> expected)
readTagLE in interface BedrockCodecHelperpublic void writeTagLE(ByteBuf buffer, Object tag)
writeTagLE in interface BedrockCodecHelperpublic void readItemUse(ByteBuf buffer, InventoryTransactionPacket packet)
readItemUse in interface BedrockCodecHelperpublic void writeItemUse(ByteBuf buffer, InventoryTransactionPacket packet)
writeItemUse in interface BedrockCodecHelperpublic boolean readInventoryActions(ByteBuf buffer, List<InventoryActionData> actions)
readInventoryActions in interface BedrockCodecHelperpublic void writeInventoryActions(ByteBuf buffer, List<InventoryActionData> actions, boolean hasNetworkIds)
writeInventoryActions in interface BedrockCodecHelperprotected InventorySource readSource(ByteBuf buffer)
protected void writeSource(ByteBuf buffer, InventorySource inventorySource)
public void readExperiments(ByteBuf buffer, List<ExperimentData> experiments)
readExperiments in interface BedrockCodecHelperpublic void writeExperiments(ByteBuf buffer, List<ExperimentData> experiments)
writeExperiments in interface BedrockCodecHelperpublic ItemStackRequest readItemStackRequest(ByteBuf buffer)
readItemStackRequest in interface BedrockCodecHelperpublic void writeItemStackRequest(ByteBuf buffer, ItemStackRequest request)
writeItemStackRequest in interface BedrockCodecHelperpublic StructureSettings readStructureSettings(ByteBuf buffer)
readStructureSettings in interface BedrockCodecHelperpublic void writeStructureSettings(ByteBuf buffer, StructureSettings settings)
writeStructureSettings in interface BedrockCodecHelperpublic SerializedSkin readSkin(ByteBuf buffer)
readSkin in interface BedrockCodecHelperpublic void writeSkin(ByteBuf buffer, SerializedSkin skin)
writeSkin in interface BedrockCodecHelperpublic AnimationData readAnimationData(ByteBuf buffer)
protected void writeAnimationData(ByteBuf buffer, AnimationData animation)
public void readEntityProperties(ByteBuf buffer, EntityProperties properties)
readEntityProperties in interface BedrockCodecHelperpublic void writeEntityProperties(ByteBuf buffer, EntityProperties properties)
writeEntityProperties in interface BedrockCodecHelperCopyright © 2018–2022 CloudburstMC. All rights reserved.