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
public class BeaconBlockEntity extends BlockEntity implements NamedScreenHandlerFactory
-
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(BlockPos blockPos, BlockState blockState) -
Method Summary
Modifier and Type Method Description private static voidapplyPlayerEffects(World world, BlockPos blockPos, int int2, StatusEffect statusEffect, StatusEffect statusEffect2)ScreenHandlercreateMenu(int syncId, PlayerInventory inv, PlayerEntity player)voidfromTag(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.private static StatusEffectgetPotionEffectById(int id)doublegetSquaredRenderDistance()voidmarkRemoved()static voidplaySound(World world, BlockPos blockPos, SoundEvent soundEvent)voidsetCustomName(Text text)voidsetWorld(World world)static voidtick(World world, BlockPos blockPos, BlockState blockState, BeaconBlockEntity beaconBlockEntity)CompoundTagtoInitialChunkDataTag()CompoundTagtoTag(CompoundTag tag)BlockEntityUpdateS2CPackettoUpdatePacket()private static intupdateLevel(World world, int x, int y, int z)Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, onSyncedBlockEvent, populateCrashReport, setCachedState
-
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
-
-
Method Details
-
tick
public static void tick(World world, BlockPos blockPos, BlockState blockState, BeaconBlockEntity beaconBlockEntity) -
updateLevel
-
markRemoved
public void markRemoved()- Overrides:
markRemovedin classBlockEntity
-
applyPlayerEffects
private static void applyPlayerEffects(World world, BlockPos blockPos, int int2, @Nullable StatusEffect statusEffect, @Nullable StatusEffect statusEffect2) -
playSound
-
getBeamSegments
-
toUpdatePacket
- Overrides:
toUpdatePacketin classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTagin classBlockEntity
-
getSquaredRenderDistance
@Environment(CLIENT) public double getSquaredRenderDistance()- Overrides:
getSquaredRenderDistancein 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
-
setWorld
- Overrides:
setWorldin classBlockEntity
-