import java.util.HashSet;
import java.util.Set;
-public class SpawningSphereProvider implements IBoundingBoxProvider<BoundingBoxSpawningSphere> {
+public class SpawningSphereProvider implements IBoundingBoxProvider<BoundingBoxSpawningSphere>, ICachingProvider {
public static final Minecraft minecraft = Minecraft.getInstance();
private static Long lastGameTime = null;
public static void setSphere(Point point) {
if (spawningSphere != null && spawningSphere.getPoint().equals(point)) return;
- clear();
dimensionId = Player.getDimensionId();
spawningSphere = new BoundingBoxSpawningSphere(point);
lastBoundingBox = null;
}
- public static boolean clear() {
+ public static boolean clearSphere() {
if (spawningSphere != null) {
lastBoundingBox = null;
spawningSphere = null;
return false;
}
+ public void clearCache() {
+ clearSphere();
+ }
+
public static void calculateSpawnableSpacesCount(BlockProcessor blockProcessor) {
if (spawningSphere != null) {
Point sphereCenter = spawningSphere.getPoint();