Refactor spawn reporting (#1519)

Not all that could be done for now
This commit is contained in:
altrisi authored and GitHub committed 2023-07-28 20:57:48 +02:00
1 parent efddb904a0
commit fbe37017c5
7 files changed
+203 -235

No files matched your search

@@ -25,6 +25,7 @@ import net.minecraft.world.level.storage.WritableLevelData;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -37,7 +38,6 @@ import static carpet.script.CarpetEventServer.Event.EXPLOSION;
import static carpet.script.CarpetEventServer.Event.LIGHTNING;
import static carpet.script.CarpetEventServer.Event.CHUNK_UNLOADED;
@Mixin(ServerLevel.class)
public abstract class ServerLevel_scarpetMixin extends Level implements ServerWorldInterface
{
@@ -94,11 +94,13 @@ public abstract class ServerLevel_scarpetMixin extends Level implements ServerWo
private ServerLevelData serverLevelData;
@Shadow @Final private PersistentEntitySectionManager<Entity> entityManager;
@Unique
@Override
public ServerLevelData getWorldPropertiesCM(){
return serverLevelData;
}
@Unique
@Override
public LevelEntityGetter<Entity> getEntityLookupCMPublic() {
return entityManager.getEntityGetter();