Skip to content

Commit

Permalink
fix: Fixes PCStorage sync not work
Browse files Browse the repository at this point in the history
  • Loading branch information
blank038 committed Nov 2, 2024
1 parent 98cb469 commit 1053f08
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package com.aiyostudio.esyncpixelmon.entity

import com.aiyostudio.esync.common.module.IEntity
import com.pixelmonmod.pixelmon.Pixelmon
import com.pixelmonmod.pixelmon.listener.PixelmonPlayerTracker
import net.minecraft.nbt.NBTTagCompound
import java.util.UUID
import net.minecraftforge.fml.common.gameevent.PlayerEvent
import java.util.*


class PixelmonEntity : IEntity {
lateinit var partyCompound: NBTTagCompound
Expand All @@ -17,6 +20,9 @@ class PixelmonEntity : IEntity {
val pcStorage = Pixelmon.storageManager.getPCForPlayer(uuid)
partyStorage.readFromNBT(partyCompound)
pcStorage.readFromNBT(pcCompound)
val event = PlayerEvent.PlayerLoggedInEvent(partyStorage.player)
PixelmonPlayerTracker.onPlayerLogin(event)
Pixelmon.storageManager.initializePCForPlayer(partyStorage.player, pcStorage)
return true
}
}

0 comments on commit 1053f08

Please sign in to comment.