Package net.minecraft.block.entity
Class BellBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.BellBlockEntity
- All Implemented Interfaces:
Tickable
public class BellBlockEntity extends BlockEntity implements Tickable
-
Field Summary
Fields Modifier and Type Field Description private List<LivingEntity>hearingEntitiesprivate longlastRingTimeDirectionlastSideHitprivate intresonateTimeprivate booleanresonatingbooleanringingintringTicksFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Constructor Description BellBlockEntity() -
Method Summary
Modifier and Type Method Description voidactivate(Direction direction)Rings the bell in a given direction.private voidapplyGlowToEntity(LivingEntity entity)Gives theStatusEffects.GLOWINGstatus effect to the given entity for 3 seconds (60 ticks).private voidapplyGlowToRaiders(World world)private voidapplyParticlesToRaiders(World world)private booleanisRaiderEntity(LivingEntity entity)private voidnotifyMemoriesOfBell()Makes living entities within 48 blocks remember that they heard a bell at the current world time.booleanonSyncedBlockEvent(int type, int data)private voidplayResonateSound()private booleanraidersHearBell()voidtick()Methods inherited from class net.minecraft.block.entity.BlockEntity
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, fromTag, getCachedState, getPos, getRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataNbt, toUpdatePacket, writeNbt
-
Field Details
-
lastRingTime
private long lastRingTime -
ringTicks
public int ringTicks -
ringing
public boolean ringing -
lastSideHit
-
hearingEntities
-
resonating
private boolean resonating -
resonateTime
private int resonateTime
-
-
Constructor Details
-
BellBlockEntity
public BellBlockEntity()
-
-
Method Details
-
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data)- Overrides:
onSyncedBlockEventin classBlockEntity
-
tick
public void tick() -
playResonateSound
private void playResonateSound() -
activate
Rings the bell in a given direction. -
notifyMemoriesOfBell
private void notifyMemoriesOfBell()Makes living entities within 48 blocks remember that they heard a bell at the current world time. -
raidersHearBell
private boolean raidersHearBell() -
applyGlowToRaiders
-
applyParticlesToRaiders
-
isRaiderEntity
-
applyGlowToEntity
Gives theStatusEffects.GLOWINGstatus effect to the given entity for 3 seconds (60 ticks).
-