-
Notifications
You must be signed in to change notification settings - Fork 755
/
TClientTickHandler.java
41 lines (35 loc) · 1.22 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
package tconstruct.client;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import tconstruct.TConstruct;
import tconstruct.common.TRepo;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.Type;
public class TClientTickHandler
{
Minecraft mc = Minecraft.getMinecraft();
TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance;
public TClientTickHandler()
{
}
@SubscribeEvent
public void onTick (ClientTickEvent event)
{
if (event.phase.equals(Phase.END) && event.type.equals(Type.RENDER))
{
TRepo.oreBerry.setGraphicsLevel(Blocks.leaves.field_150121_P);
TRepo.oreBerrySecond.setGraphicsLevel(Blocks.leaves.field_150121_P);
TRepo.slimeLeaves.setGraphicsLevel(Blocks.leaves.field_150121_P);
if (mc.thePlayer != null && mc.thePlayer.onGround)
controlInstance.landOnGround();
}
}
/* @Override
public EnumSet<TickType> ticks ()
{
return EnumSet.of(TickType.RENDER);
}
*/
}