* Lift entity limit up to the `getOtherEntities` method so it bails early This has the potential to prevent a lot of bounding box computation * Clean up decompiled code * Fix raw generic types This doesn't alter the signature, but it helps the compiler warn about misuse of the type later on * Actually abort forEach when `limit` entities have been checked `throw`ing a known exception is the easiest way to `break` out of a forEach call
23 lines
728 B
Java
23 lines
728 B
Java
package carpet.fakes;
|
|
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.entity.BlockEntity;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.EntityType;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.math.Box;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.function.Predicate;
|
|
|
|
public interface WorldInterface
|
|
{
|
|
Map<EntityType<?>, Entity> getPrecookedMobs();
|
|
|
|
boolean setBlockStateWithBlockEntity(BlockPos blockPos, BlockState blockState, BlockEntity newBlockEntity, int int1);
|
|
|
|
List<Entity> getOtherEntitiesLimited(@Nullable Entity except, Box box, Predicate<? super Entity> predicate, int limit);
|
|
}
|