-
Notifications
You must be signed in to change notification settings - Fork 328
/
GCPlayerBaseSP.java
89 lines (77 loc) · 2.57 KB
/
GCPlayerBaseSP.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package micdoodle8.mods.galacticraft.core.entities.player;
import api.player.client.ClientPlayerAPI;
import api.player.client.ClientPlayerBase;
import cpw.mods.fml.common.Loader;
import micdoodle8.mods.galacticraft.core.dimension.WorldProviderOrbit;
import micdoodle8.mods.galacticraft.core.proxy.ClientProxyCore;
import micdoodle8.mods.galacticraft.core.util.WorldUtil;
public class GCPlayerBaseSP extends ClientPlayerBase
{
public GCPlayerBaseSP(ClientPlayerAPI playerAPI)
{
super(playerAPI);
}
private IPlayerClient getClientHandler()
{
return ClientProxyCore.playerClientHandler;
}
// @Override
// public void wakeUpPlayer(boolean par1, boolean par2, boolean par3)
// {
// if (!this.getClientHandler().wakeUpPlayer(this, par1, par2, par3))
// {
// super.wakeUpPlayer(par1, par2, par3);
// }
// }
@Override
public boolean isEntityInsideOpaqueBlock()
{
return this.getClientHandler().isEntityInsideOpaqueBlock(this.player, super.isEntityInsideOpaqueBlock());
}
@Override
public void onLivingUpdate()
{
this.getClientHandler().onLivingUpdatePre(this.player);
super.onLivingUpdate();
this.getClientHandler().onLivingUpdatePost(this.player);
}
@Override
public void moveEntity(double par1, double par3, double par5)
{
super.moveEntity(par1, par3, par5);
this.getClientHandler().moveEntity(this.player, par1, par3, par5);
}
@Override
public void afterMoveEntityWithHeading(float paramFloat1, float paramFloat2)
{
super.afterMoveEntityWithHeading(paramFloat1, paramFloat2);
if (Loader.isModLoaded("SmartMoving") && !this.player.capabilities.isFlying)
{
this.player.motionY += 0.080000000000000002D;
this.player.motionY -= WorldUtil.getGravityForEntity(this.player);
}
}
@Override
public void onUpdate()
{
this.getClientHandler().onUpdate(this.player);
super.onUpdate();
}
@Override
public boolean isSneaking()
{
if (this.player.worldObj.provider instanceof WorldProviderOrbit)
{
GCPlayerStatsClient stats = GCPlayerStatsClient.get(this.player);
if (!this.player.onGround) return false;
if (stats.landingTicks > 0) return true;
}
return super.isSneaking();
}
// @Override
// @SideOnly(Side.CLIENT)
// public float getBedOrientationInDegrees()
// {
// return this.getClientHandler().getBedOrientationInDegrees(this, super.getBedOrientationInDegrees());
// }
}