mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-28 14:37:31 +02:00
Remove unnecessary size check for queues
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
ae97aec7aa
commit
ec90af0e12
@ -528,7 +528,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// scheduled tasks
|
// scheduled tasks
|
||||||
if (!nextTick.isEmpty()) {
|
{
|
||||||
Consumer<Entity> callback;
|
Consumer<Entity> callback;
|
||||||
while ((callback = nextTick.poll()) != null) {
|
while ((callback = nextTick.poll()) != null) {
|
||||||
callback.accept(this);
|
callback.accept(this);
|
||||||
|
@ -571,7 +571,7 @@ public abstract class Instance implements BlockGetter, BlockSetter, Tickable, Ta
|
|||||||
@Override
|
@Override
|
||||||
public void tick(long time) {
|
public void tick(long time) {
|
||||||
// Scheduled tasks
|
// Scheduled tasks
|
||||||
if (!nextTick.isEmpty()) {
|
{
|
||||||
Consumer<Instance> callback;
|
Consumer<Instance> callback;
|
||||||
while ((callback = nextTick.poll()) != null) {
|
while ((callback = nextTick.poll()) != null) {
|
||||||
callback.accept(this);
|
callback.accept(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user