Class PortalBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.wdiscute.echoes.blocks.portal.PortalBlockEntity
All Implemented Interfaces:
com.wdiscute.utils.TickableBlockEntity, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class PortalBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements com.wdiscute.utils.TickableBlockEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    static Set<net.minecraft.core.BlockPos>
     
    static final net.minecraft.world.level.block.SculkSpreader
     

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    PortalBlockEntity(net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.BlockPos
    getClosestOpenPortal(net.minecraft.core.BlockPos pos)
     
    protected void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    preRemoveSideEffects(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    setLooting(List<com.wdiscute.utils.MaybeStack> loot)
     
    void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    void
    tickClient(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
    void
    tickServer(net.minecraft.server.level.ServerLevel sl, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
  • Field Details

    • SCULK_SPREADER

      public static final net.minecraft.world.level.block.SculkSpreader SCULK_SPREADER
    • instanceUUID

      public UUID instanceUUID
    • portals

      public static Set<net.minecraft.core.BlockPos> portals
  • Constructor Details

    • PortalBlockEntity

      public PortalBlockEntity(net.minecraft.core.BlockPos worldPosition, net.minecraft.world.level.block.state.BlockState blockState)
  • Method Details

    • getClosestOpenPortal

      public static net.minecraft.core.BlockPos getClosestOpenPortal(net.minecraft.core.BlockPos pos)
    • tickClient

      public void tickClient(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      tickClient in interface com.wdiscute.utils.TickableBlockEntity
    • setLooting

      public void setLooting(List<com.wdiscute.utils.MaybeStack> loot)
    • tickServer

      public void tickServer(net.minecraft.server.level.ServerLevel sl, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      tickServer in interface com.wdiscute.utils.TickableBlockEntity
    • preRemoveSideEffects

      public void preRemoveSideEffects(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
    • saveAdditional

      protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • loadAdditional

      protected void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • tick

      public void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      tick in interface com.wdiscute.utils.TickableBlockEntity