Class CachedLevelBlock

java.lang.Object
dev.latvian.mods.kubejs.level.CachedLevelBlock
All Implemented Interfaces:
BlockProviderKJS, RegistryObjectKJS<net.minecraft.world.level.block.Block>, LevelBlock, dev.latvian.mods.rhino.util.SpecialEquality

public class CachedLevelBlock extends Object implements LevelBlock
  • Field Details

    • minecraftLevel

      public final net.minecraft.world.level.Level minecraftLevel
    • cachedState

      public transient net.minecraft.world.level.block.state.BlockState cachedState
    • cachedEntity

      public transient net.minecraft.world.level.block.entity.BlockEntity cachedEntity
  • Constructor Details

    • CachedLevelBlock

      public CachedLevelBlock(net.minecraft.world.level.Level w, net.minecraft.core.BlockPos p)
  • Method Details

    • getLevel

      public net.minecraft.world.level.Level getLevel()
      Specified by:
      getLevel in interface LevelBlock
    • getPos

      public net.minecraft.core.BlockPos getPos()
      Specified by:
      getPos in interface LevelBlock
    • cache

      public LevelBlock cache(net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      cache in interface LevelBlock
    • cache

      public LevelBlock cache(net.minecraft.world.level.block.entity.BlockEntity entity)
      Specified by:
      cache in interface LevelBlock
    • clearCache

      public void clearCache()
    • getBlockState

      public net.minecraft.world.level.block.state.BlockState getBlockState()
      Specified by:
      getBlockState in interface LevelBlock
    • setBlockState

      public void setBlockState(net.minecraft.world.level.block.state.BlockState state, int flags)
      Specified by:
      setBlockState in interface LevelBlock
    • getEntity

      @Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity getEntity()
      Specified by:
      getEntity in interface LevelBlock
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object