Class WrappedLevelChunkData.BlockEntityInfo

java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedLevelChunkData.BlockEntityInfo
Enclosing class:
WrappedLevelChunkData

public static class WrappedLevelChunkData.BlockEntityInfo extends AbstractWrapper
Represents an immutable BlockEntityInfo in the MAP_CHUNK packet.
  • Constructor Details

    • BlockEntityInfo

      public BlockEntityInfo(Object handle)
  • 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

      public MinecraftKey getTypeKey()
      The registry key of the block entity type.
      Returns:
      the registry key.
    • setTypeKey

      public void setTypeKey(MinecraftKey typeKey)
      Sets the registry key of the block entity type
      Parameters:
      typeKey - the new block entity type key
    • getAdditionalData

      @Nullable public @Nullable NbtCompound getAdditionalData()
      The NBT-Tag of this block entity containing additional information. (ex. text lines for a sign)
      Returns:
      the NBT-Tag or null.
    • setAdditionalData

      public void setAdditionalData(@Nullable @Nullable NbtCompound additionalData)
      Edits the additional data specified for this block entity.
      Parameters:
      additionalData - the additional data for this block entity, can be null
    • 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 be null.