本文整理匯總了Java中cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java TickEvent.RenderTickEvent方法的具體用法?Java TickEvent.RenderTickEvent怎麽用?Java TickEvent.RenderTickEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cpw.mods.fml.common.gameevent.TickEvent
的用法示例。
在下文中一共展示了TickEvent.RenderTickEvent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderTick(TickEvent.RenderTickEvent event)
{
Minecraft mc = FMLClientHandler.instance().getClient();
World world = mc.theWorld;
if (event.phase != TickEvent.Phase.START) {
if ((Minecraft.getMinecraft().renderViewEntity instanceof EntityPlayer)) {
EntityPlayer player = (EntityPlayer)Minecraft.getMinecraft().renderViewEntity;
if ((player != null) && (mc.inGameHasFocus) && (Minecraft.isGuiEnabled())) {
// If player have radiation detector on hotbar.
if (isPlayerHasItemOnHotbar(player.inventory, ItemsHZDS.radiation_detector)) {
PlayerTracker tracker = TrackerManager.lookupTrackerFromUsername(mc.thePlayer.getCommandSenderName());
if (tracker != null) {
renderRadiation(tracker);
}
}
}
}
}
}
示例2: onDraw
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onDraw(final TickEvent.RenderTickEvent event) {
if (event.phase != TickEvent.Phase.END || !this.display || CommandTPSTimer.displayString.length() == 0) {
return;
}
final Minecraft minecraft = Minecraft.getMinecraft();
if (minecraft.theWorld == null) {
CommandTPSTimer.displayString = "";
return;
}
final FontRenderer fontrenderer = minecraft.fontRenderer;
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glEnable(3042);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glBlendFunc(770, 771);
RenderHelper.disableStandardItemLighting();
fontrenderer.drawString(CommandTPSTimer.displayString, 0, 0, -1, true);
}
示例3: onRenderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent event) {
// If no client world we're not playing. Abort.
if (Minecraft.getMinecraft().theWorld == null) return;
if (event.phase == TickEvent.Phase.START) {
// Anything we need to render for the current frame should happen either during or before the main world render
// Here we call the renderer for "live portal" renders.
PerspectiveRenderManager.onRenderTick(printstream);
return;
}
if (event.phase == TickEvent.Phase.END) {
// We render the world views at the end of the render tick.
WorldViewRenderManager.onRenderTick(printstream);
return;
}
}
示例4: guiRendered
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void guiRendered(TickEvent.RenderTickEvent evt)
{
if (CreeperHost.instance.toastText != null)
{
long curTime = System.currentTimeMillis();
if (CreeperHost.instance.fadeTime > curTime)
{
long fadeDiff = CreeperHost.instance.fadeTime - CreeperHost.instance.endTime;
long curFade = Math.min(CreeperHost.instance.fadeTime - curTime, fadeDiff);
float alpha = (float) curFade / (float) fadeDiff;
RenderHelper.disableStandardItemLighting();
GL11.glColor4f(1.0F, 1.0F, 1.0F, alpha);
mc.renderEngine.bindTexture(getToastResourceLocation());
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
drawTexturedModalRect(res.getScaledWidth() - 160, 0, u, v, 160, 32);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
int textColour = (0xFFFFFF << 32) | ((int) (alpha * 255) << 24);
mc.fontRenderer.drawSplitString(CreeperHost.instance.toastText, res.getScaledWidth() - 160 + 5, 6, 160, textColour);
}
else
{
CreeperHost.instance.toastText = null;
}
}
}
示例5: onRenderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent event) {
if (event.phase == TickEvent.Phase.START)
return;
if (currentlyPlaying != null) {
currentlyPlaying.tick(event.renderTickTime);
}
}
示例6: tickFixAnnoyingOverlay
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void tickFixAnnoyingOverlay(TickEvent.RenderTickEvent event) {
if(Minecraft.getMinecraft().thePlayer != null) {
GCPlayerStatsClient stats = GCPlayerStatsClient.get((EntityPlayerSP)Minecraft.getMinecraft().thePlayer);
if(stats != null)
stats.oxygenSetupValid = true;
}
}
示例7: renderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void renderTick( TickEvent.RenderTickEvent event )
{
Minecraft mc = Minecraft.getMinecraft();
if( mc.theWorld != null )
{
if( guiNotification == null )
guiNotification = new GuiNotification( mc );
guiNotification.update();
}
}
示例8: renderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void renderTick(TickEvent.RenderTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
if (mc.theWorld == null) return;
if (event.phase == TickEvent.Phase.END) {
unlocked.updateGui();
}
}
示例9: tick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void tick(TickEvent.RenderTickEvent event) {
if (event.phase == TickEvent.Phase.START
&& Minecraft.getMinecraft().theWorld != null) {
for (Object o : Util.getClientsMovements()) {
EntityPlayerCustom player = ((EntityPlayerCustom)Minecraft.getMinecraft().thePlayer.getExtendedProperties("Cube's Edge Player"));
// if (!((IMovementClient) o).isMovementDisabled()) {
((MovementClient) o).renderTick(player);
// }
}
}
}
示例10: onClientRenderWorldTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onClientRenderWorldTick(TickEvent.RenderTickEvent event) {
// End of tick and in-game
if (event.phase == TickEvent.Phase.END && RenderUtil.MINECRAFT.currentScreen == null) {
final ScaledResolution scaledResolution = new ScaledResolution(RenderUtil.MINECRAFT, RenderUtil.MINECRAFT.displayWidth, RenderUtil.MINECRAFT.displayHeight);
final int scaledWidth = scaledResolution.getScaledWidth();
final int scaledHeight = scaledResolution.getScaledHeight();
// Draw Game logo
GL11.glPushMatrix();
RenderUtil.MINECRAFT.getTextureManager().bindTexture(alphaResource);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glTranslatef(scaledWidth - 47, scaledHeight - 45, 0);
GL11.glScalef(0.50f, 0.50f, 1.0f);
GL11.glTranslatef(-scaledWidth + 47, -scaledHeight + 45, 0);
GL11.glEnable(GL11.GL_BLEND);
RenderUtil.create2DRectangleModal(scaledWidth - 47, scaledHeight - 45, 100, 95, 0);
RenderUtil.TESSELLATOR.draw();
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
// Draw milestone string
GL11.glPushMatrix();
GL11.glTranslatef(scaledWidth - 14, scaledHeight - 8, 0.0f);
GL11.glScalef(0.50f, 0.50f, 1.0f);
GL11.glTranslatef(-scaledWidth + 14, -scaledHeight + 8, 0.0f);
RenderUtil.MINECRAFT.fontRenderer.drawString("Alpha", scaledWidth - 14, scaledHeight - 3, Integer.parseInt("7767AE", 16));
GL11.glPopMatrix();
}
}
示例11: renderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void renderTick(TickEvent.RenderTickEvent renderTickEvent) {
if (renderTickEvent.phase == TickEvent.Phase.END) {
TickUtil.RENDER_TICKER++;
TickUtil.onRenderTick();
}
}
示例12: getFrame
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void getFrame(final TickEvent.RenderTickEvent event) {
this.renderTickTime = event.renderTickTime;
}
示例13: getTimer
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void getTimer(final TickEvent.RenderTickEvent event) {
EventHandlerClient.renderTickTime = event.renderTickTime;
}
示例14: tickEvent
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void tickEvent(TickEvent.RenderTickEvent event) {
if(event.phase == Phase.END && NEIClientConfig.isEnabled())
HUDRenderer.renderOverlay();
}
示例15: renderTick
import cpw.mods.fml.common.gameevent.TickEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void renderTick(TickEvent.RenderTickEvent event) {
if(event.phase == Phase.START)
renderFrame = event.renderTickTime;
}