Update updateSuppressionBlock for 1.19 (#1401)
* Changed Rule: `updateSuppressionBlock` to match new update suppression * Make it easier to use * Carpets mixin file will be the death of me * Renamed `WorldInterface` to `LevelInterface` Merged LevelAccessor with LevelInterface * Fix issues with 22w14a & resolve issues * Add `@Unique` to Level_tickMixin.java * Naming, brackets, and description * Return null on invalid * Fix remaining refactoring issues
This commit is contained in:
1 parent
a60bc386cb
commit
9daf72b348
11 files changed
+69
-66
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import carpet.fakes.WorldInterface;
|
||||
import carpet.fakes.LevelInterface;
|
||||
import carpet.utils.SpawnReporter;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -139,7 +139,7 @@ public class NaturalSpawnerMixin
|
||||
{
|
||||
if (CarpetSettings.lagFreeSpawning)
|
||||
{
|
||||
Map<EntityType<?>, Entity> precookedMobs = ((WorldInterface)world_1).getPrecookedMobs();
|
||||
Map<EntityType<?>, Entity> precookedMobs = ((LevelInterface)world_1).getPrecookedMobs();
|
||||
if (precookedMobs.containsKey(entityType))
|
||||
//this mob has been <init>'s but not used yet
|
||||
return precookedMobs.get(entityType);
|
||||
@@ -159,7 +159,7 @@ public class NaturalSpawnerMixin
|
||||
{
|
||||
if (CarpetSettings.lagFreeSpawning)
|
||||
// we used the mob - next time we will create a new one when needed
|
||||
((WorldInterface) world).getPrecookedMobs().remove(entity_1.getType());
|
||||
((LevelInterface) world).getPrecookedMobs().remove(entity_1.getType());
|
||||
|
||||
if (SpawnReporter.track_spawns > 0L && SpawnReporter.local_spawns != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user