Resolve raw type warnings (#1516)

Also very small optimization to hopper counters and removal of redundant casts in `PerimeterDiagnostics`
This commit is contained in:
altrisi authored and GitHub committed 2022-07-29 13:12:09 +02:00
1 parent be3c7f267c
commit 8f7e45387e
7 files changed
+17 -17

No files matched your search

@@ -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;
}
}
}