-
Notifications
You must be signed in to change notification settings - Fork 755
/
TClientTickHandler.java
45 lines (38 loc) · 1.16 KB
/
TClientTickHandler.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
package tconstruct.client;
import java.util.EnumSet;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
public class TClientTickHandler implements ITickHandler
{
Minecraft mc = Minecraft.getMinecraft();
TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance;
@Override
public void tickEnd (EnumSet<TickType> type, Object... tickData)
{
TContent.oreBerry.setGraphicsLevel(Block.leaves.graphicsLevel);
TContent.oreBerrySecond.setGraphicsLevel(Block.leaves.graphicsLevel);
TContent.slimeLeaves.setGraphicsLevel(Block.leaves.graphicsLevel);
if (mc.thePlayer != null && mc.thePlayer.onGround)
{
controlInstance.landOnGround();
}
}
@Override
public EnumSet<TickType> ticks ()
{
return EnumSet.of(TickType.RENDER);
}
@Override
public void tickStart (EnumSet<TickType> type, Object... tickData)
{
}
@Override
public String getLabel ()
{
return null;
}
}