public class BeaconBlockEntity extends BlockEntity implements NamedScreenHandlerFactory, Tickable
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() |
Modifier and Type | Method and 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) |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
public 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
private void updateLevel(int x, int y, int z)
public void markRemoved()
markRemoved
in class BlockEntity
private void applyPlayerEffects()
public void playSound(SoundEvent soundEvent)
@Environment(value=CLIENT) public List<BeaconBlockEntity.BeamSegment> getBeamSegments()
public int getLevel()
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket
in class BlockEntity
public 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(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
@Nullable public ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
createMenu
in interface ScreenHandlerFactory
public Text getDisplayName()
getDisplayName
in interface NamedScreenHandlerFactory