public class BeaconBlockEntity extends BlockEntity implements NamedScreenHandlerFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
BeaconBlockEntity.BeamSegment |
| Modifier and Type | Field and 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 |
pos, removed, world| Constructor and Description |
|---|
BeaconBlockEntity(BlockPos blockPos,
BlockState blockState) |
| Modifier and Type | Method and 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 compoundTag) |
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) |
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, onSyncedBlockEvent, populateCrashReport, setCachedStatepublic static final StatusEffect[][] EFFECTS_BY_LEVEL
private static final Set<StatusEffect> EFFECTS
private List<BeaconBlockEntity.BeamSegment> beamSegments
private List<BeaconBlockEntity.BeamSegment> field_19178
private int level
private int field_19179
@Nullable private StatusEffect primary
@Nullable private StatusEffect secondary
private ContainerLock lock
private final PropertyDelegate propertyDelegate
public BeaconBlockEntity(BlockPos blockPos, BlockState blockState)
public static void tick(World world, BlockPos blockPos, BlockState blockState, BeaconBlockEntity beaconBlockEntity)
private static int updateLevel(World world, int x, int y, int z)
public void markRemoved()
markRemoved in class BlockEntityprivate static void applyPlayerEffects(World world, BlockPos blockPos, int int2, @Nullable StatusEffect statusEffect, @Nullable StatusEffect statusEffect2)
public static void playSound(World world, BlockPos blockPos, SoundEvent soundEvent)
@Environment(value=CLIENT) public List<BeaconBlockEntity.BeamSegment> getBeamSegments()
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket in class BlockEntitypublic CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag in class BlockEntity@Environment(value=CLIENT) public double getSquaredRenderDistance()
getSquaredRenderDistance in class BlockEntity@Nullable private static StatusEffect getPotionEffectById(int id)
public void fromTag(CompoundTag compoundTag)
fromTag in class BlockEntitypublic CompoundTag toTag(CompoundTag tag)
toTag in class BlockEntity@Nullable public ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
createMenu in interface ScreenHandlerFactorypublic Text getDisplayName()
getDisplayName in interface NamedScreenHandlerFactorypublic void setWorld(World world)
setWorld in class BlockEntity