mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-22 20:44:54 +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
|
||||
if (!nextTick.isEmpty()) {
|
||||
{
|
||||
Consumer<Entity> callback;
|
||||
while ((callback = nextTick.poll()) != null) {
|
||||
callback.accept(this);
|
||||
|
|
|
@ -571,7 +571,7 @@ public abstract class Instance implements BlockGetter, BlockSetter, Tickable, Ta
|
|||
@Override
|
||||
public void tick(long time) {
|
||||
// Scheduled tasks
|
||||
if (!nextTick.isEmpty()) {
|
||||
{
|
||||
Consumer<Instance> callback;
|
||||
while ((callback = nextTick.poll()) != null) {
|
||||
callback.accept(this);
|
||||
|
|
Loading…
Reference in New Issue
Block a user