Package net.minecraft.block.entity
Class BeaconBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.BeaconBlockEntity
- All Implemented Interfaces:
NamedScreenHandlerFactory,ScreenHandlerFactory,Tickable
public class BeaconBlockEntity extends BlockEntity implements NamedScreenHandlerFactory, Tickable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBeaconBlockEntity.BeamSegment -
Field Summary
Fields Modifier and Type Field Description private List<BeaconBlockEntity.BeamSegment>beamSegmentsprivate TextcustomNameprivate static Set<StatusEffect>EFFECTSstatic StatusEffect[][]EFFECTS_BY_LEVELprivate List<BeaconBlockEntity.BeamSegment>field_19178private intfield_19179private intlevelprivate ContainerLocklockprivate StatusEffectprimaryprivate PropertyDelegatepropertyDelegateprivate StatusEffectsecondaryFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Constructor Description BeaconBlockEntity() -
Method Summary
Modifier and Type Method Description private voidapplyPlayerEffects()ScreenHandlercreateMenu(int syncId, PlayerInventory inv, PlayerEntity player)voidfromTag(BlockState state, CompoundTag tag)List<BeaconBlockEntity.BeamSegment>getBeamSegments()TextgetDisplayName()Returns the title of this screen handler; will be a part of the open screen packet sent to the client.intgetLevel()private static StatusEffectgetPotionEffectById(int id)doublegetRenderDistance()voidmarkRemoved()voidplaySound(SoundEvent soundEvent)voidsetCustomName(Text text)voidtick()CompoundTagtoInitialChunkDataTag()CompoundTagtoTag(CompoundTag tag)BlockEntityUpdateS2CPackettoUpdatePacket()private voidupdateLevel(int x, int y, int z)Methods inherited from class net.minecraft.block.entity.BlockEntity
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
-
Field Details
-
EFFECTS_BY_LEVEL
-
EFFECTS
-
beamSegments
-
field_19178
-
level
private int level -
field_19179
private int field_19179 -
-
secondary
-
customName
-
lock
-
propertyDelegate
-
-
Constructor Details
-
BeaconBlockEntity
public BeaconBlockEntity()
-
-
Method Details
-
tick
public void tick() -
updateLevel
private void updateLevel(int x, int y, int z) -
markRemoved
public void markRemoved()- Overrides:
markRemovedin classBlockEntity
-
applyPlayerEffects
private void applyPlayerEffects() -
playSound
-
getBeamSegments
-
getLevel
public int getLevel() -
toUpdatePacket
- Overrides:
toUpdatePacketin classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTagin classBlockEntity
-
getRenderDistance
@Environment(CLIENT) public double getRenderDistance()- Overrides:
getRenderDistancein classBlockEntity
-
getPotionEffectById
-
fromTag
- Overrides:
fromTagin classBlockEntity
-
toTag
- Overrides:
toTagin classBlockEntity
-
setCustomName
-
createMenu
- Specified by:
createMenuin interfaceScreenHandlerFactory
-
getDisplayName
Returns the title of this screen handler; will be a part of the open screen packet sent to the client.- Specified by:
getDisplayNamein interfaceNamedScreenHandlerFactory
-