Skip to content

Commit 972e16d

Browse files
authored
Merge pull request #2123 from stellanera98/1.20-will-aura
Fix Will Aura vanishing on chunk unload
2 parents 98a801c + 2c0e697 commit 972e16d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/wayoftime/bloodmagic/util/handler/event/WillHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import wayoftime.bloodmagic.demonaura.WillChunk;
3535
import wayoftime.bloodmagic.demonaura.WorldDemonWillHandler;
3636
import wayoftime.bloodmagic.potion.BloodMagicPotions;
37+
import wayoftime.bloodmagic.util.BMLog;
3738
import wayoftime.bloodmagic.will.DemonWillHolder;
3839
import wayoftime.bloodmagic.will.PlayerDemonWillHandler;
3940

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

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

199-
CompoundTag nbt = new CompoundTag();
200-
event.getData().put("BloodMagic", nbt);
201200

202201
WillChunk ac = WorldDemonWillHandler.getWillChunk(rl, loc.x, loc.z);
203202
if (ac != null)
204203
{
204+
CompoundTag nbt = new CompoundTag();
205205
nbt.putShort("base", ac.getBase());
206206
ac.getCurrentWill().writeToNBT(nbt, "current");
207+
208+
event.getData().put("BloodMagic", nbt);
207209
// if (event.getChunk() instanceof Chunk && !((Chunk) event.getChunk()).setLoaded(loaded);)
208210
// event.getWorld().getChunkSource().getChunk(p_62228_, p_62229_, p_62230_)
209211
// if (!event.getWorld().getChunkSource().isEntityTickingChunk(event.getChunk().getPos()))

0 commit comments

Comments
 (0)