Class BlockEntityAbstractImpetus

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
at.petrak.hexcasting.api.block.HexBlockEntity
at.petrak.hexcasting.api.casting.circles.BlockEntityAbstractImpetus
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.WorldlyContainer
Direct Known Subclasses:
BlockEntityLookingImpetus, BlockEntityRedstoneImpetus, BlockEntityRightClickImpetus

public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implements net.minecraft.world.WorldlyContainer
Default impl for an impetus, not tecnically necessary but I'm exposing it for ease of use

This does assume a great deal so you might have to re-implement a lot of this yourself if you wanna do something wild and new

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected @Nullable net.minecraft.world.item.ItemStack
     
    protected @Nullable net.minecraft.network.chat.Component
     
    protected @Nullable CircleExecutionState
     
    protected long
     
    protected @Nullable FrozenPigment
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

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

    level, remove, worldPosition

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockEntityAbstractImpetus(net.minecraft.world.level.block.entity.BlockEntityType<?> pType, net.minecraft.core.BlockPos pWorldPosition, net.minecraft.world.level.block.state.BlockState pBlockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyScryingLensOverlay(List<com.mojang.datafixers.util.Pair<net.minecraft.world.item.ItemStack,net.minecraft.network.chat.Component>> lines, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player observer, net.minecraft.world.level.Level world, net.minecraft.core.Direction hitFace)
     
    boolean
    canPlaceItem(int index, net.minecraft.world.item.ItemStack stack)
     
    boolean
    canPlaceItemThroughFace(int index, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction dir)
     
    boolean
    canTakeItemThroughFace(int var1, net.minecraft.world.item.ItemStack var2, net.minecraft.core.Direction var3)
     
    void
     
    void
     
    void
     
    long
    extractMediaFromInsertedItem(net.minecraft.world.item.ItemStack stack, boolean simulate)
     
    protected static net.minecraft.world.phys.AABB
    getBounds(List<net.minecraft.core.BlockPos> poses)
     
    int
     
    @Nullable net.minecraft.network.chat.Component
     
    ONLY CALL THIS WHEN YOU KNOW THE WORLD EXISTS AND ON THE SERVER, lazy-loads it
    net.minecraft.world.item.ItemStack
    getItem(int index)
     
    long
     
     
    int[]
    getSlotsForFace(net.minecraft.core.Direction var1)
     
    net.minecraft.core.Direction
     
    void
    insertMedia(net.minecraft.world.item.ItemStack stack)
     
    boolean
     
    protected void
    loadModData(net.minecraft.nbt.CompoundTag tag)
     
    void
    postDisplay(net.minecraft.network.chat.Component error, net.minecraft.world.item.ItemStack display)
     
    void
    postMishap(net.minecraft.network.chat.Component mishapDisplay)
     
    void
    postNoExits(net.minecraft.core.BlockPos pos)
     
    void
    postPrint(net.minecraft.network.chat.Component printDisplay)
     
    long
     
    net.minecraft.world.item.ItemStack
    removeItem(int index, int count)
     
    net.minecraft.world.item.ItemStack
    removeItemNoUpdate(int index)
     
    protected void
    saveModData(net.minecraft.nbt.CompoundTag tag)
     
    protected int
     
    void
     
    void
    setItem(int index, net.minecraft.world.item.ItemStack stack)
     
    void
    setMedia(long media)
     
    @Nullable FrozenPigment
    setPigment(@Nullable FrozenPigment pigment)
     
    void
    startExecution(@Nullable net.minecraft.server.level.ServerPlayer player)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
     

    Methods inherited from class at.petrak.hexcasting.api.block.HexBlockEntity

    getUpdatePacket, getUpdateTag, load, saveAdditional, sync

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

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.Container

    canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpen
  • Field Details

  • Constructor Details

    • BlockEntityAbstractImpetus

      public BlockEntityAbstractImpetus(net.minecraft.world.level.block.entity.BlockEntityType<?> pType, net.minecraft.core.BlockPos pWorldPosition, net.minecraft.world.level.block.state.BlockState pBlockState)
  • Method Details

    • getStartDirection

      public net.minecraft.core.Direction getStartDirection()
    • getDisplayMsg

      @Nullable public @Nullable net.minecraft.network.chat.Component getDisplayMsg()
    • clearDisplay

      public void clearDisplay()
    • postDisplay

      public void postDisplay(net.minecraft.network.chat.Component error, net.minecraft.world.item.ItemStack display)
    • postMishap

      public void postMishap(net.minecraft.network.chat.Component mishapDisplay)
    • postPrint

      public void postPrint(net.minecraft.network.chat.Component printDisplay)
    • postNoExits

      public void postNoExits(net.minecraft.core.BlockPos pos)
    • tickExecution

      public void tickExecution()
    • endExecution

      public void endExecution()
    • getExecutionState

      @Nullable public @Nullable CircleExecutionState getExecutionState()
      ONLY CALL THIS WHEN YOU KNOW THE WORLD EXISTS AND ON THE SERVER, lazy-loads it
    • startExecution

      public void startExecution(@Nullable @Nullable net.minecraft.server.level.ServerPlayer player)
    • getBounds

      @Contract(pure=true) protected static net.minecraft.world.phys.AABB getBounds(List<net.minecraft.core.BlockPos> poses)
    • getMedia

      public long getMedia()
    • setMedia

      public void setMedia(long media)
    • extractMediaFromInsertedItem

      public long extractMediaFromInsertedItem(net.minecraft.world.item.ItemStack stack, boolean simulate)
    • insertMedia

      public void insertMedia(net.minecraft.world.item.ItemStack stack)
    • setInfiniteMedia

      public void setInfiniteMedia()
    • remainingMediaCapacity

      public long remainingMediaCapacity()
    • getPigment

      public FrozenPigment getPigment()
    • setPigment

      @Nullable public @Nullable FrozenPigment setPigment(@Nullable @Nullable FrozenPigment pigment)
    • saveModData

      protected void saveModData(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      saveModData in class HexBlockEntity
    • loadModData

      protected void loadModData(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      loadModData in class HexBlockEntity
    • applyScryingLensOverlay

      public void applyScryingLensOverlay(List<com.mojang.datafixers.util.Pair<net.minecraft.world.item.ItemStack,net.minecraft.network.chat.Component>> lines, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player observer, net.minecraft.world.level.Level world, net.minecraft.core.Direction hitFace)
    • semitoneFromScale

      protected int semitoneFromScale(int note)
    • getSlotsForFace

      public int[] getSlotsForFace(net.minecraft.core.Direction var1)
      Specified by:
      getSlotsForFace in interface net.minecraft.world.WorldlyContainer
    • canPlaceItemThroughFace

      public boolean canPlaceItemThroughFace(int index, net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.Direction dir)
      Specified by:
      canPlaceItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • canTakeItemThroughFace

      public boolean canTakeItemThroughFace(int var1, net.minecraft.world.item.ItemStack var2, net.minecraft.core.Direction var3)
      Specified by:
      canTakeItemThroughFace in interface net.minecraft.world.WorldlyContainer
    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface net.minecraft.world.Container
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int index)
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int index, int count)
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int index, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
    • canPlaceItem

      public boolean canPlaceItem(int index, net.minecraft.world.item.ItemStack stack)
      Specified by:
      canPlaceItem in interface net.minecraft.world.Container