Package com.comphenix.protocol.wrappers
Class WrappedLevelChunkData.BlockEntityInfo
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedLevelChunkData.BlockEntityInfo
- Enclosing class:
WrappedLevelChunkData
Represents an immutable BlockEntityInfo in the MAP_CHUNK packet.
-
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromValues(int sectionX, int sectionZ, int y, MinecraftKey typeKey) Creates a wrapper using raw valuesfromValues(int sectionX, int sectionZ, int y, MinecraftKey typeKey, @Nullable NbtCompound additionalData) Creates a wrapper using raw values@Nullable NbtCompoundThe NBT-Tag of this block entity containing additional information.intThe section-relative X-coordinate of the block entity.intThe section-relative Z-coordinate of the block entity.The registry key of the block entity type.intgetY()The Y-coordinate of the block entity.voidsetAdditionalData(@Nullable NbtCompound additionalData) Edits the additional data specified for this block entity.voidsetSectionX(int sectionX) Sets the section-relative X-coordinate of the block entityvoidsetSectionZ(int sectionZ) Sets the section-relative Z-coordinate of the block entityvoidsetTypeKey(MinecraftKey typeKey) Sets the registry key of the block entity typevoidsetY(int y) Sets the Y-coordinate of the block entity.Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle, toString
-
Constructor Details
-
BlockEntityInfo
-
-
Method Details
-
getSectionX
public int getSectionX()The section-relative X-coordinate of the block entity.- Returns:
- the unpacked X-coordinate.
-
setSectionX
public void setSectionX(int sectionX) Sets the section-relative X-coordinate of the block entity- Parameters:
sectionX- the section-relative x coordinate
-
getSectionZ
public int getSectionZ()The section-relative Z-coordinate of the block entity.- Returns:
- the unpacked Z-coordinate.
-
setSectionZ
public void setSectionZ(int sectionZ) Sets the section-relative Z-coordinate of the block entity- Parameters:
sectionZ- the section-relative z coordinate
-
getY
public int getY()The Y-coordinate of the block entity.- Returns:
- the Y-coordinate.
-
setY
public void setY(int y) Sets the Y-coordinate of the block entity.- Parameters:
y- the new y coordinate
-
getTypeKey
The registry key of the block entity type.- Returns:
- the registry key.
-
setTypeKey
Sets the registry key of the block entity type- Parameters:
typeKey- the new block entity type key
-
getAdditionalData
The NBT-Tag of this block entity containing additional information. (ex. text lines for a sign)- Returns:
- the NBT-Tag or
null.
-
setAdditionalData
Edits the additional data specified for this block entity.- Parameters:
additionalData- the additional data for this block entity, can benull
-
fromValues
public static WrappedLevelChunkData.BlockEntityInfo fromValues(int sectionX, int sectionZ, int y, MinecraftKey typeKey) Creates a wrapper using raw values- Parameters:
sectionX- the section-relative X-coordinate of the block entity.sectionZ- the section-relative Z-coordinate of the block entity.y- the Y-coordinate of the block entity.typeKey- the minecraft key of the block entity type.
-
fromValues
public static WrappedLevelChunkData.BlockEntityInfo fromValues(int sectionX, int sectionZ, int y, MinecraftKey typeKey, @Nullable @Nullable NbtCompound additionalData) Creates a wrapper using raw values- Parameters:
sectionX- the section-relative X-coordinate of the block entity.sectionZ- the section-relative Z-coordinate of the block entity.y- the Y-coordinate of the block entity.typeKey- the minecraft key of the block entity type.additionalData- An NBT-Tag containing additional information. Can benull.
-