Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import wayoftime.bloodmagic.demonaura.WillChunk;
import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler;
import wayoftime.bloodmagic.potion.BloodMagicPotions;
import wayoftime.bloodmagic.util.BMLog;
import wayoftime.bloodmagic.will.DemonWillHolder;
import wayoftime.bloodmagic.will.PlayerDemonWillHandler;

Expand Down Expand Up @@ -196,14 +197,15 @@ public void chunkSave(ChunkDataEvent.Save event)

ChunkPos loc = event.getChunk().getPos();

CompoundTag nbt = new CompoundTag();
event.getData().put("BloodMagic", nbt);

WillChunk ac = WorldDemonWillHandler.getWillChunk(rl, loc.x, loc.z);
if (ac != null)
{
CompoundTag nbt = new CompoundTag();
nbt.putShort("base", ac.getBase());
ac.getCurrentWill().writeToNBT(nbt, "current");

event.getData().put("BloodMagic", nbt);
// if (event.getChunk() instanceof Chunk && !((Chunk) event.getChunk()).setLoaded(loaded);)
// event.getWorld().getChunkSource().getChunk(p_62228_, p_62229_, p_62230_)
// if (!event.getWorld().getChunkSource().isEntityTickingChunk(event.getChunk().getPos()))
Expand Down