Skip to content

Commit

Permalink
change: update chunk-loading internals (non-final)
Browse files Browse the repository at this point in the history
  • Loading branch information
ROMVoid95 committed Mar 4, 2022
1 parent 086000d commit 8137f7d
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 437 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
import micdoodle8.mods.galacticraft.core.util.OxygenUtil;
import micdoodle8.mods.galacticraft.core.util.PlayerUtil;
import micdoodle8.mods.galacticraft.core.world.ChunkLoadingCallback;
import micdoodle8.mods.galacticraft.core.wrappers.PlayerGearData;
import micdoodle8.mods.galacticraft.planets.asteroids.AsteroidsModule;
import micdoodle8.mods.galacticraft.planets.mars.network.PacketSimpleMars;
Expand Down Expand Up @@ -103,9 +102,6 @@
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.event.terraingen.TerrainGen;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.ChunkEvent.Load;
import net.minecraftforge.event.world.WorldEvent.Save;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.eventhandler.Event;
Expand Down Expand Up @@ -144,26 +140,26 @@ public void onPortalSpawn(BlockEvent.PortalSpawnEvent event)
}
}

@SubscribeEvent
public void onWorldSave(Save event)
{
ChunkLoadingCallback.save((WorldServer) event.getWorld());
}

@SubscribeEvent
public void onChunkDataLoad(ChunkDataEvent.Load event)
{
ChunkLoadingCallback.load((WorldServer) event.getWorld());
}

@SubscribeEvent
public void onWorldLoad(Load event)
{
if (!event.getWorld().isRemote)
{
ChunkLoadingCallback.load((WorldServer) event.getWorld());
}
}
// @SubscribeEvent(priority = EventPriority.LOWEST)
// public void onWorldSave(Save event)
// {
// ChunkLoadingCallback.save((WorldServer) event.getWorld());
// }
//
// @SubscribeEvent(priority = EventPriority.LOWEST)
// public void onChunkDataLoad(ChunkDataEvent.Load event)
// {
// ChunkLoadingCallback.load((WorldServer) event.getWorld());
// }
//
// @SubscribeEvent(priority = EventPriority.LOWEST)
// public void onWorldLoad(Load event)
// {
// if (!event.getWorld().isRemote)
// {
// ChunkLoadingCallback.load((WorldServer) event.getWorld());
// }
// }

@SubscribeEvent
public void onEntityDamaged(LivingHurtEvent event)
Expand Down
Loading

0 comments on commit 8137f7d

Please sign in to comment.