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 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(BlockPos blockPos, BlockState blockState)
-
Method Summary
Modifier and Type Method Description private static void
applyPlayerEffects(World world, BlockPos blockPos, int int2, StatusEffect statusEffect, StatusEffect statusEffect2)
ScreenHandler
createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
void
fromTag(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.private static StatusEffect
getPotionEffectById(int id)
double
getSquaredRenderDistance()
void
markRemoved()
static void
playSound(World world, BlockPos blockPos, SoundEvent soundEvent)
void
setCustomName(Text text)
void
setWorld(World world)
static void
tick(World world, BlockPos blockPos, BlockState blockState, BeaconBlockEntity beaconBlockEntity)
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
private static int
updateLevel(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:
markRemoved
in classBlockEntity
-
applyPlayerEffects
private static void applyPlayerEffects(World world, BlockPos blockPos, int int2, @Nullable StatusEffect statusEffect, @Nullable StatusEffect statusEffect2) -
playSound
-
getBeamSegments
-
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
-
setWorld
- Overrides:
setWorld
in classBlockEntity
-