Skip to content

Commit f5c6093

Browse files
committed
one less loop
1 parent 3f83819 commit f5c6093

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/dev/wolfieboy09/qstorage/entity/GasCloudEntity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public void tick() {
4343
ServerLevel serverLevel = (ServerLevel) this.level();
4444
AABB area = this.getBoundingBox().inflate(3.0); // 3-block radius
4545

46-
for (LivingEntity entity : serverLevel.getEntitiesOfClass(LivingEntity.class, area)) {
47-
this.gas.getGasData().effects().forEach((e) -> entity.addEffect(new MobEffectInstance(e)));
48-
}
46+
serverLevel.getEntitiesOfClass(LivingEntity.class, area).forEach((entity) ->
47+
this.gas.getGasData().effects().forEach((effect) ->
48+
entity.addEffect(new MobEffectInstance(effect))));
4949

5050
serverLevel.sendParticles(ParticleTypes.CLOUD, this.getX(), this.getY(), this.getZ(), 5, 0.2, 0.2, 0.2, 0.01);
5151

0 commit comments

Comments
 (0)