mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-16 15:45:21 +01:00
chore: minor entity class warning cleanup (#2049)
This commit is contained in:
parent
115f9c1355
commit
ceeab08a2a
@ -75,7 +75,7 @@ import java.util.function.UnaryOperator;
|
||||
/**
|
||||
* Could be a player, a monster, or an object.
|
||||
* <p>
|
||||
* To create your own entity you probably want to extends {@link LivingEntity} or {@link EntityCreature} instead.
|
||||
* To create your own entity you probably want to extend {@link LivingEntity} or {@link EntityCreature} instead.
|
||||
*/
|
||||
public class Entity implements Viewable, Tickable, Schedulable, Snapshotable, EventHandler<EntityEvent>, Taggable,
|
||||
PermissionHandler, HoverEventSource<ShowEntity>, Sound.Emitter, Shape {
|
||||
@ -1377,6 +1377,7 @@ public class Entity implements Viewable, Tickable, Schedulable, Snapshotable, Ev
|
||||
final boolean positionChange = (distanceX + distanceY + distanceZ) > 0;
|
||||
|
||||
final Chunk chunk = getChunk();
|
||||
assert chunk != null;
|
||||
if (distanceX > 8 || distanceY > 8 || distanceZ > 8) {
|
||||
PacketUtils.prepareViewablePacket(chunk, new EntityTeleportPacket(getEntityId(), position, isOnGround()), this);
|
||||
nextSynchronizationTick = synchronizationTicks + 1;
|
||||
|
@ -33,12 +33,12 @@ public class EntityTrackerIntegrationTest {
|
||||
final AtomicInteger viewersCount = new AtomicInteger();
|
||||
final Entity entity = new Entity(EntityType.ZOMBIE) {
|
||||
@Override
|
||||
public void updateNewViewer(Player player) {
|
||||
public void updateNewViewer(@NotNull Player player) {
|
||||
viewersCount.incrementAndGet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOldViewer(Player player) {
|
||||
public void updateOldViewer(@NotNull Player player) {
|
||||
viewersCount.decrementAndGet();
|
||||
}
|
||||
};
|
||||
@ -65,12 +65,12 @@ public class EntityTrackerIntegrationTest {
|
||||
final AtomicInteger viewersCount = new AtomicInteger();
|
||||
final Entity entity = new Entity(EntityType.ZOMBIE) {
|
||||
@Override
|
||||
public void updateNewViewer(Player player) {
|
||||
public void updateNewViewer(@NotNull Player player) {
|
||||
viewersCount.incrementAndGet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOldViewer(Player player) {
|
||||
public void updateOldViewer(@NotNull Player player) {
|
||||
viewersCount.decrementAndGet();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user