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 class
BeaconBlockEntity.BeamSegment
-
Field Summary
Fields Modifier and Type Field Description private List<BeaconBlockEntity.BeamSegment>
beamSegments
private Text
customName
private static Set<StatusEffect>
EFFECTS
static StatusEffect[][]
EFFECTS_BY_LEVEL
private List<BeaconBlockEntity.BeamSegment>
field_19178
private int
field_19179
private int
level
private ContainerLock
lock
private StatusEffect
primary
private PropertyDelegate
propertyDelegate
private StatusEffect
secondary
Fields 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 void
applyPlayerEffects()
ScreenHandler
createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
void
fromTag(BlockState state, CompoundTag tag)
List<BeaconBlockEntity.BeamSegment>
getBeamSegments()
Text
getDisplayName()
Returns the title of this screen handler; will be a part of the open screen packet sent to the client.int
getLevel()
private static StatusEffect
getPotionEffectById(int id)
double
getSquaredRenderDistance()
void
markRemoved()
void
playSound(SoundEvent soundEvent)
void
setCustomName(Text text)
void
tick()
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
private void
updateLevel(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:
markRemoved
in classBlockEntity
-
applyPlayerEffects
private void applyPlayerEffects() -
playSound
-
getBeamSegments
-
getLevel
public int getLevel() -
toUpdatePacket
- Overrides:
toUpdatePacket
in classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTag
in classBlockEntity
-
getSquaredRenderDistance
@Environment(CLIENT) public double getSquaredRenderDistance()- Overrides:
getSquaredRenderDistance
in classBlockEntity
-
getPotionEffectById
-
fromTag
- Overrides:
fromTag
in classBlockEntity
-
toTag
- Overrides:
toTag
in classBlockEntity
-
setCustomName
-
createMenu
- Specified by:
createMenu
in interfaceScreenHandlerFactory
-
getDisplayName
Returns the title of this screen handler; will be a part of the open screen packet sent to the client.- Specified by:
getDisplayName
in interfaceNamedScreenHandlerFactory
-