This commit is contained in:
gnembon committed 2024-09-11 23:02:41 +02:00
1 parent 8f096dadb8
commit 299b93c215
6 files changed
+12 -19

No files matched your search

@@ -2,6 +2,7 @@ package carpet.mixins;
import carpet.fakes.LevelInterface;
import com.google.common.collect.Lists;
import net.minecraft.util.profiling.Profiler;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -9,7 +10,6 @@ import org.spongepowered.asm.mixin.Shadow;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Predicate;
import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.boss.EnderDragonPart;
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
@@ -24,7 +24,7 @@ public abstract class Level_getOtherEntitiesLimited implements LevelInterface {
@Override
public List<Entity> getOtherEntitiesLimited(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate, int limit) {
this.getProfiler().incrementCounter("getEntities"); // visit
Profiler.get().incrementCounter("getEntities"); // visit
AtomicInteger checkedEntities = new AtomicInteger();
List<Entity> list = Lists.newArrayList();
try {
@@ -55,9 +55,6 @@ public abstract class Level_getOtherEntitiesLimited implements LevelInterface {
return list;
}
@Shadow
public abstract ProfilerFiller getProfiler();
@Shadow
protected abstract LevelEntityGetter<Entity> getEntities();
}