net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent Java Examples
The following examples show how to use
net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventsClient.java From Valkyrien-Skies with Apache License 2.0 | 6 votes |
@SubscribeEvent public void onRenderTickEvent(RenderTickEvent event) { World world = Minecraft.getMinecraft().world; if (world == null) { return; // No ships to worry about. } double partialTicks = event.renderTickTime; if (Minecraft.getMinecraft().isGamePaused()) { partialTicks = Minecraft.getMinecraft().renderPartialTicksPaused; } if (event.phase == Phase.START) { for (PhysicsWrapperEntity wrapper : ValkyrienSkiesMod.VS_PHYSICS_MANAGER .getManagerForWorld(world) .getTickablePhysicsEntities()) { wrapper.getPhysicsObject().getShipTransformationManager() .updateRenderTransform(partialTicks); } } }
Example #2
Source File: VideoHook.java From malmo with MIT License | 5 votes |
/** * Called before and after the rendering of the world. * * @param event * Contains information about the event. */ @SubscribeEvent public void onRender(RenderTickEvent event) { if( event.phase == Phase.START ) { // this is here in case the user has resized the window during a mission resizeIfNeeded(); } }
Example #3
Source File: StateEpisode.java From malmo with MIT License | 4 votes |
/** Subclass should overrride this to act on render ticks.*/ protected void onRenderTick(RenderTickEvent ev) {}