Skip to content

Commit

Permalink
Update PlayerPokemobCache.java
Browse files Browse the repository at this point in the history
fixes some client side issues on PCs
  • Loading branch information
Thutmose committed Feb 15, 2021
1 parent 23e0a8e commit 5d4635e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.LogicalSidedProvider;
import pokecube.core.PokecubeCore;
import pokecube.core.interfaces.IPokemob;
import pokecube.core.items.pokecubes.PokecubeManager;
import thut.core.common.handlers.PlayerDataHandler;
Expand All @@ -33,6 +35,7 @@ public static void UpdateCache(final IPokemob mob)

public static void UpdateCache(final ItemStack stack, final boolean pc, final boolean deleted)
{
if (!(PokecubeCore.proxy.getWorld() instanceof ServerWorld)) return;
final MinecraftServer server = LogicalSidedProvider.INSTANCE.get(LogicalSide.SERVER);
server.execute(() -> PlayerPokemobCache.UpdateCacheImpl(stack, pc, deleted));
}
Expand Down

0 comments on commit 5d4635e

Please sign in to comment.