mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-03-03 16:51:28 +01:00
Fixed crash when logging in (maybe?)
This commit is contained in:
parent
eb28d20d26
commit
663d37a602
3 changed files with 9 additions and 9 deletions
|
@ -43,6 +43,11 @@ public class UClient {
|
|||
return null;
|
||||
}
|
||||
|
||||
@FUF(reason = "Forced client Separation")
|
||||
public boolean isClientPlayer(@Nullable EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void preInit(FMLPreInitializationEvent event) {}
|
||||
|
||||
public void init(FMLInitializationEvent event) {}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.player;
|
|||
import java.util.UUID;
|
||||
|
||||
import com.minelittlepony.model.anim.IInterpolator;
|
||||
import com.minelittlepony.unicopia.UClient;
|
||||
import com.minelittlepony.unicopia.enchanting.IPageOwner;
|
||||
import com.minelittlepony.unicopia.network.ITransmittable;
|
||||
import com.minelittlepony.unicopia.spell.ICaster;
|
||||
|
@ -38,7 +39,9 @@ public interface IPlayer extends ICaster<EntityPlayer>, IRaceContainer<EntityPla
|
|||
setEnergy(getEnergy() + energy / 100F);
|
||||
}
|
||||
|
||||
boolean isClientPlayer();
|
||||
default boolean isClientPlayer() {
|
||||
return UClient.instance().isClientPlayer(getOwner());
|
||||
}
|
||||
|
||||
void copyFrom(IPlayer oldPlayer);
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import com.google.common.collect.Lists;
|
|||
import com.minelittlepony.model.anim.BasicEasingInterpolator;
|
||||
import com.minelittlepony.model.anim.IInterpolator;
|
||||
import com.minelittlepony.unicopia.Race;
|
||||
import com.minelittlepony.unicopia.UClient;
|
||||
import com.minelittlepony.unicopia.Unicopia;
|
||||
import com.minelittlepony.unicopia.network.EffectSync;
|
||||
import com.minelittlepony.unicopia.network.MsgPlayerCapabilities;
|
||||
|
@ -16,7 +15,6 @@ import com.minelittlepony.unicopia.spell.IMagicEffect;
|
|||
import com.minelittlepony.unicopia.spell.SpellAffinity;
|
||||
import com.minelittlepony.unicopia.spell.SpellRegistry;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -159,12 +157,6 @@ class PlayerCapabilities implements IPlayer {
|
|||
return interpolator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClientPlayer() {
|
||||
return UClient.isClientSide() &&
|
||||
Minecraft.getMinecraft().player.getGameProfile().getId().equals(getOwner().getGameProfile().getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeUpdate(EntityPlayer entity) {
|
||||
if (entity.world.isRemote) {
|
||||
|
|
Loading…
Add table
Reference in a new issue