public class ConduitBlockEntity extends BlockEntity implements Tickable
Modifier and Type | Field and Description |
---|---|
private static Block[] |
ACTIVATING_BLOCKS |
private List<BlockPos> |
activatingBlocks |
private boolean |
active |
private boolean |
eyeOpen |
private long |
nextAmbientSoundTime |
private LivingEntity |
targetEntity |
private UUID |
targetUuid |
int |
ticks |
private float |
ticksActive |
pos, removed, world
Constructor and Description |
---|
ConduitBlockEntity() |
ConduitBlockEntity(BlockEntityType<?> type) |
Modifier and Type | Method and Description |
---|---|
private void |
attackHostileEntity() |
private LivingEntity |
findTargetEntity() |
void |
fromTag(BlockState state,
CompoundTag tag) |
private Box |
getAttackZone() |
float |
getRotation(float tickDelta) |
private void |
givePlayersEffects() |
boolean |
isActive() |
boolean |
isEyeOpen() |
void |
playSound(SoundEvent soundEvent) |
private void |
setActive(boolean active) |
private void |
setEyeOpen(boolean eyeOpen) |
private void |
spawnNautilusParticles() |
void |
tick() |
CompoundTag |
toInitialChunkDataTag() |
CompoundTag |
toTag(CompoundTag tag) |
BlockEntityUpdateS2CPacket |
toUpdatePacket() |
private boolean |
updateActivatingBlocks() |
private void |
updateTargetEntity() |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
private static final Block[] ACTIVATING_BLOCKS
public int ticks
private float ticksActive
private boolean active
private boolean eyeOpen
@Nullable private LivingEntity targetEntity
private long nextAmbientSoundTime
public ConduitBlockEntity()
public ConduitBlockEntity(BlockEntityType<?> type)
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket
in class BlockEntity
public CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag
in class BlockEntity
private boolean updateActivatingBlocks()
private void givePlayersEffects()
private void attackHostileEntity()
private void updateTargetEntity()
private Box getAttackZone()
@Nullable private LivingEntity findTargetEntity()
private void spawnNautilusParticles()
public boolean isActive()
@Environment(value=CLIENT) public boolean isEyeOpen()
private void setActive(boolean active)
private void setEyeOpen(boolean eyeOpen)
@Environment(value=CLIENT) public float getRotation(float tickDelta)
public void playSound(SoundEvent soundEvent)