Resolve raw type warnings (#1516)
Also very small optimization to hopper counters and removal of redundant casts in `PerimeterDiagnostics`
This commit is contained in:
1 parent
be3c7f267c
commit
8f7e45387e
7 files changed
+17
-17
No files matched your search
@@ -85,7 +85,7 @@ public class PerimeterDiagnostics
|
||||
}
|
||||
}
|
||||
PerimeterDiagnostics diagnostic = new PerimeterDiagnostics(worldserver,ctype,el);
|
||||
EntityType type = EntityType.ZOMBIE;
|
||||
EntityType<?> type = EntityType.ZOMBIE;
|
||||
if (el != null) type = el.getType();
|
||||
int minY = worldserver.getMinBuildHeight();
|
||||
int maxY = worldserver.getMaxBuildHeight();
|
||||
@@ -180,7 +180,7 @@ public class PerimeterDiagnostics
|
||||
|
||||
if (NaturalSpawner.isSpawnPositionOk(spt, worldServer, pos, sle.type))
|
||||
{
|
||||
el.moveTo((float)pos.getX() + 0.5F, (float)pos.getY(), (float)pos.getZ()+0.5F, 0.0F, 0.0F);
|
||||
el.moveTo(pos.getX() + 0.5F, pos.getY(), pos.getZ()+0.5F, 0.0F, 0.0F);
|
||||
return el.checkSpawnObstruction(worldServer) && el.checkSpawnRules(worldServer, MobSpawnType.NATURAL) &&
|
||||
SpawnPlacements.checkSpawnRules(el.getType(),(ServerLevel)el.getCommandSenderWorld(), MobSpawnType.NATURAL, el.blockPosition(), el.getCommandSenderWorld().random) &&
|
||||
worldServer.noCollision(el); // check collision rules once they stop fiddling with them after 1.14.1
|
||||
|
||||
@@ -52,7 +52,7 @@ public class SpawnReporter
|
||||
public static Long track_spawns = 0L;
|
||||
public static final HashMap<ResourceKey<Level>, Integer> chunkCounts = new HashMap<>();
|
||||
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Object2LongMap<EntityType>> spawn_stats = new HashMap<>();
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Object2LongMap<EntityType<?>>> spawn_stats = new HashMap<>();
|
||||
public static double mobcap_exponent = 0.0D;
|
||||
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Long> spawn_attempts = new HashMap<>();
|
||||
@@ -62,7 +62,7 @@ public class SpawnReporter
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Long> spawn_ticks_succ = new HashMap<>();
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Long> spawn_ticks_spawns = new HashMap<>();
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, Long> spawn_cap_count = new HashMap<>();
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, EvictingQueue<Pair<EntityType, BlockPos>>> spawned_mobs = new HashMap<>();
|
||||
public static final HashMap<Pair<ResourceKey<Level>, MobCategory>, EvictingQueue<Pair<EntityType<?>, BlockPos>>> spawned_mobs = new HashMap<>();
|
||||
public static final HashMap<MobCategory, Integer> spawn_tries = new HashMap<>();
|
||||
public static BlockPos lower_spawning_limit = null;
|
||||
public static BlockPos upper_spawning_limit = null;
|
||||
@@ -170,7 +170,7 @@ public class SpawnReporter
|
||||
String type_code = creature_type.getName();
|
||||
|
||||
lst.add(Messenger.s(String.format("Recent %s spawns:",type_code)));
|
||||
for (Pair<EntityType, BlockPos> pair : spawned_mobs.get(Pair.of(world.dimension(), creature_type)).keySet()) // getDImTYpe
|
||||
for (Pair<EntityType<?>, BlockPos> pair : spawned_mobs.get(Pair.of(world.dimension(), creature_type)).keySet()) // getDImTYpe
|
||||
{
|
||||
lst.add( Messenger.c(
|
||||
"w - ",
|
||||
@@ -291,7 +291,7 @@ public class SpawnReporter
|
||||
if (!all && persistent)
|
||||
continue;
|
||||
|
||||
EntityType type = entity.getType();
|
||||
EntityType<?> type = entity.getType();
|
||||
BlockPos pos = entity.blockPosition();
|
||||
lst.add( Messenger.c(
|
||||
"w - ",
|
||||
@@ -387,7 +387,7 @@ public class SpawnReporter
|
||||
(100.0D*spawn_ticks_succ.get(code))/ spawn_attempts.get(code),
|
||||
(1.0D*spawn_ticks_spawns.get(code))/(spawn_ticks_fail.get(code)+spawn_ticks_succ.get(code))
|
||||
)));
|
||||
for (EntityType type: spawn_stats.get(code).keySet())
|
||||
for (EntityType<?> type: spawn_stats.get(code).keySet())
|
||||
{
|
||||
report.add(Messenger.s(String.format(" - %s: %d spawns, %d per hour",
|
||||
type.getDescription().getString(),
|
||||
@@ -559,4 +559,4 @@ public class SpawnReporter
|
||||
}
|
||||
return rep;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user