Class BeaconBlockEntity
java.lang.Object
net.neoforged.neoforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BeaconBlockEntity
- All Implemented Interfaces:
MenuConstructor
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IBlockEntityExtension
,INBTSerializable<CompoundTag>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final MobEffect[][]
(package private) List<BeaconBlockEntity.BeaconBeamSection>
private static final int
private List<BeaconBlockEntity.BeaconBeamSection>
static final int
static final int
static final int
private final ContainerData
private static final Component
private int
(package private) int
private LockCode
private static final int
private Component
static final int
(package private) MobEffect
(package private) MobEffect
private static final String
private static final String
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
applyEffects
(Level p_155098_, BlockPos p_155099_, int p_155100_, MobEffect p_155101_, MobEffect p_155102_) createMenu
(int p_58696_, Inventory p_58697_, Player p_58698_) (package private) static MobEffect
filterEffect
(MobEffect p_298440_) getName()
void
load
(CompoundTag p_155113_) private static MobEffect
loadEffect
(CompoundTag p_298570_, String p_299310_) static void
playSound
(Level p_155104_, BlockPos p_155105_, SoundEvent p_155106_) protected void
saveAdditional
(CompoundTag p_187463_) void
setCustomName
(Component p_58682_) void
void
private static void
storeEffect
(CompoundTag p_298214_, String p_298983_, MobEffect p_299071_) static void
tick
(Level p_155108_, BlockPos p_155109_, BlockState p_155110_, BeaconBlockEntity p_155111_) private static int
updateBase
(Level p_155093_, int p_155094_, int p_155095_, int p_155096_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, triggerEvent
Methods inherited from class net.neoforged.neoforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
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.common.extensions.IBlockEntityExtension
deserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.neoforged.neoforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
MAX_LEVELS
private static final int MAX_LEVELS- See Also:
-
BEACON_EFFECTS
-
VALID_EFFECTS
-
DATA_LEVELS
public static final int DATA_LEVELS- See Also:
-
DATA_PRIMARY
public static final int DATA_PRIMARY- See Also:
-
DATA_SECONDARY
public static final int DATA_SECONDARY- See Also:
-
NUM_DATA_VALUES
public static final int NUM_DATA_VALUES- See Also:
-
BLOCKS_CHECK_PER_TICK
private static final int BLOCKS_CHECK_PER_TICK- See Also:
-
DEFAULT_NAME
-
TAG_PRIMARY
- See Also:
-
TAG_SECONDARY
- See Also:
-
beamSections
List<BeaconBlockEntity.BeaconBeamSection> beamSections -
checkingBeamSections
-
levels
int levels -
lastCheckY
private int lastCheckY -
-
secondaryPower
-
name
-
lockKey
-
dataAccess
-
-
Constructor Details
-
BeaconBlockEntity
-
-
Method Details
-
filterEffect
-
tick
public static void tick(Level p_155108_, BlockPos p_155109_, BlockState p_155110_, BeaconBlockEntity p_155111_) -
updateBase
-
setRemoved
public void setRemoved()- Overrides:
setRemoved
in classBlockEntity
-
applyEffects
-
playSound
-
getBeamSections
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
storeEffect
private static void storeEffect(CompoundTag p_298214_, String p_298983_, @Nullable MobEffect p_299071_) -
loadEffect
-
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
setCustomName
-
getCustomName
- Specified by:
getCustomName
in interfaceNameable
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int p_58696_, Inventory p_58697_, Player p_58698_) - Specified by:
createMenu
in interfaceMenuConstructor
-
getDisplayName
- Specified by:
getDisplayName
in interfaceMenuProvider
- Specified by:
getDisplayName
in interfaceNameable
-
getName
-
setLevel
- Overrides:
setLevel
in classBlockEntity
-