Class BlockEntityTranslator

java.lang.Object
org.geysermc.geyser.translator.level.block.entity.BlockEntityTranslator
Direct Known Subclasses:
BannerBlockEntityTranslator, BeaconBlockEntityTranslator, BedBlockEntityTranslator, CampfireBlockEntityTranslator, CommandBlockBlockEntityTranslator, DoubleChestBlockEntityTranslator, EmptyBlockEntityTranslator, EndGatewayBlockEntityTranslator, JigsawBlockBlockEntityTranslator, ShulkerBoxBlockEntityTranslator, SignBlockEntityTranslator, SkullBlockEntityTranslator, SpawnerBlockEntityTranslator

public abstract class BlockEntityTranslator extends Object
The class that all block entities (on both Java and Bedrock) should translate with
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.nukkitx.nbt.NbtMap
    getBlockEntityTag​(com.github.steveice10.mc.protocol.data.game.level.block.BlockEntityType type, int x, int y, int z, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
     
    protected com.nukkitx.nbt.NbtMapBuilder
    getConstantBedrockTag​(String bedrockId, int x, int y, int z)
     
    protected <T> T
    getOrDefault​(com.github.steveice10.opennbt.tag.builtin.Tag tag, T defaultValue)
     
    abstract void
    translateTag​(com.nukkitx.nbt.NbtMapBuilder builder, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockEntityTranslator

      protected BlockEntityTranslator()
  • Method Details

    • translateTag

      public abstract void translateTag(com.nukkitx.nbt.NbtMapBuilder builder, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
    • getBlockEntityTag

      public com.nukkitx.nbt.NbtMap getBlockEntityTag(com.github.steveice10.mc.protocol.data.game.level.block.BlockEntityType type, int x, int y, int z, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
    • getConstantBedrockTag

      protected com.nukkitx.nbt.NbtMapBuilder getConstantBedrockTag(String bedrockId, int x, int y, int z)
    • getOrDefault

      protected <T> T getOrDefault(com.github.steveice10.opennbt.tag.builtin.Tag tag, T defaultValue)