Codota Logo
OpenGlHelper.setLightmapTextureCoords
Code IndexAdd Codota to your IDE (free)

How to use
setLightmapTextureCoords
method
in
net.minecraft.client.renderer.OpenGlHelper

Best Java code snippets using net.minecraft.client.renderer.OpenGlHelper.setLightmapTextureCoords (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: Vazkii/Botania

int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
spinningCube.render(1F / 16F);
origin: MatterOverdrive/MatterOverdrive-Legacy-Edition

public static void disableLightmap() {
  lastLightMapX = OpenGlHelper.lastBrightnessX;
  lastLightMapY = OpenGlHelper.lastBrightnessY;
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
}
origin: AppliedEnergistics/Applied-Energistics-2

/**
 * Render an item in 2D.
 */
public static void renderItem2d( ItemStack itemStack, float scale )
{
  if( !itemStack.isEmpty() )
  {
    OpenGlHelper.setLightmapTextureCoords( OpenGlHelper.lightmapTexUnit, 240.f, 240.0f );
    GlStateManager.pushMatrix();
    // The Z-scaling by 0.0001 causes the model to be visually "flattened"
    // This cannot replace a proper projection, but it's cheap and gives the desired
    // effect at least from head-on
    GlStateManager.scale( scale / 32.0f, scale / 32.0f, 0.0001f );
    // Position the item icon at the top middle of the panel
    GlStateManager.translate( -8, -11, 0 );
    RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
    renderItem.renderItemAndEffectIntoGUI( itemStack, 0, 0 );
    GlStateManager.popMatrix();
  }
}
origin: Vazkii/Botania

@Override
@SideOnly(Side.CLIENT)
public void onPlayerBaubleRender(ItemStack stack, EntityPlayer player, RenderType type, float partialTicks) {
  if(type == RenderType.BODY) {
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    Helper.rotateIfSneaking(player);
    boolean armor = !player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).isEmpty();
    GlStateManager.rotate(180F, 1F, 0F, 0F);
    GlStateManager.translate(-0.26F, -0.4F, armor ? 0.2F : 0.15F);
    GlStateManager.scale(0.5F, 0.5F, 0.5F);
    for(TextureAtlasSprite icon : new TextureAtlasSprite[] { MiscellaneousIcons.INSTANCE.bloodPendantChain, MiscellaneousIcons.INSTANCE.bloodPendantGem }) {
      float f = icon.getMinU();
      float f1 = icon.getMaxU();
      float f2 = icon.getMinV();
      float f3 = icon.getMaxV();
      IconHelper.renderIconIn3D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
      Color color = new Color(Minecraft.getMinecraft().getItemColors().colorMultiplier(stack, 1));
      GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
      int light = 15728880;
      int lightmapX = light % 65536;
      int lightmapY = light / 65536;
      OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
    }
    GL11.glColor3ub((byte) 255, (byte) 255, (byte) 255);
  }
}
origin: Vazkii/Botania

int lightmapX = light % 65536;
int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
GlStateManager.color(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
origin: Vazkii/Botania

protected int setPixieBrightness(EntityPixie par1EntityPixie, int par2, float par3) {
  if (par2 != 0)
    return -1;
  else {
    bindTexture(getEntityTexture(par1EntityPixie));
    float f1 = 1.0F;
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
    if (par1EntityPixie.isInvisible())
      GlStateManager.depthMask(false);
    else
      GlStateManager.depthMask(true);
    char c0 = 61680;
    int j = c0 % 65536;
    int k = c0 / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, f1);
    return 1;
  }
}
origin: Vazkii/Botania

  rx = 20F;
  ry = -(float) ((Math.sin((double) (player.ticksExisted + partialTicks) * (flying ? 0.4F : 0.2F)) + 0.6F) * (flying ? 30F : 5F));
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
  break;
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
  h = -0.1F;
  rz = 0F;
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
  rz = 180F;
  rx = 0F;
GlStateManager.popMatrix();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lbx, lby);
origin: Vazkii/Botania

int lightmapX = light % 65536;
int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
GlStateManager.color(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
origin: MightyPirates/TIS-3D

/**
 * Configure the light map so that whatever is rendered next is rendered at
 * full brightness, regardless of environment brightness. Useful for rendering
 * overlays that should be emissive to also be visible in the dark.
 */
@SideOnly(Side.CLIENT)
public static void ignoreLighting() {
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
}
origin: ata4/dragon-mounts

  protected void enableLighting(int b) {
    int u = b % 65536;
    int v = b / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, u, v);
    GlStateManager.enableLighting();
  }
}
origin: Vazkii/Botania

@Override
@SideOnly(Side.CLIENT)
public void onPlayerBaubleRender(ItemStack stack, EntityPlayer player, RenderType type, float partialTicks) {
  if(type == RenderType.BODY) {
    Helper.rotateIfSneaking(player);
    boolean armor = !player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).isEmpty();
    GlStateManager.translate(0F, armor ? -0.07F : -0.01F, 0F);
    float s = 1F / 16F;
    GlStateManager.scale(s, s, s);
    if(model == null)
      model = new ModelCloak();
    GlStateManager.enableLighting();
    GlStateManager.enableRescaleNormal();
    Minecraft.getMinecraft().renderEngine.bindTexture(getCloakTexture());
    model.render(1F);
    int light = 15728880;
    int lightmapX = light % 65536;
    int lightmapY = light / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
    Minecraft.getMinecraft().renderEngine.bindTexture(getCloakGlowTexture());
    model.render(1F);
  }
}
origin: Vazkii/Botania

float f3 = icon.getMaxV();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
GlStateManager.disableLighting();
IconHelper.renderIconIn3D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
origin: SleepyTrousers/EnderCore

public static void setupLightmapCoords(@Nonnull BlockPos pos, @Nonnull World world) {
 float f = world.getLight(pos);
 int l = RenderUtil.getLightBrightnessForSkyBlocks(world, pos, 0);
 int l1 = l % 65536;
 int l2 = l / 65536;
 GlStateManager.color(f, f, f);
 OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, l1, l2);
}
origin: Vazkii/Botania

int lightmapX = light % 65536;
int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.NONE);
GlStateManager.popMatrix();
origin: Vazkii/Botania

int lightmapX = light % 65536;
int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
float alpha = (float) Math.sin(ClientTickHandler.ticksInGame / 20D) / 2F + 0.5F;
GlStateManager.color(1F, 1F, 1F, alpha + 0.183F);
origin: MatterOverdrive/MatterOverdrive-Legacy-Edition

private void setLightmap(EntityPlayerSP player) {
  int i = this.mc.world.getCombinedLight(new BlockPos(player.posX, player.posY + (double) player.getEyeHeight(), player.posZ), 0);
  float f = (float) (i & 65535);
  float f1 = (float) (i >> 16);
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, f, f1);
}
origin: Vazkii/Quark

private void renderTotemIcon(EntityTotemOfHolding entity) { 
  OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
  Minecraft mc = Minecraft.getMinecraft();
  mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
  AtlasSpriteHelper.renderIconThicc(TotemOfHolding.totemSprite, 1F / 16F);
}

origin: PrinceOfAmber/Cyclic

public void fixLighting(TileEntity te) {
 int ambLight = getWorld().getCombinedLight(te.getPos().offset(EnumFacing.UP), 0);
 if (ambLight == 0) {
  ambLight = 15728656;//if there is a block above blocking light, dont make it dark
 }
 int lu = ambLight % 65536;
 int lv = ambLight / 65536;
 OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lu / 1.0F, lv / 1.0F);
 //end of 'fix lighting'
}
origin: Vazkii/Botania

GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.shadeModel(GL11.GL_SMOOTH);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
GlStateManager.disableLighting();
GlStateManager.disableCull();
origin: AppliedEnergistics/Applied-Energistics-2

final int var12 = br / 65536;
OpenGlHelper.setLightmapTextureCoords( OpenGlHelper.lightmapTexUnit, var11, var12 );
net.minecraft.client.rendererOpenGlHelpersetLightmapTextureCoords

Popular methods of OpenGlHelper

  • glBlendFunc
  • setActiveTexture
  • glBindBuffer
  • glBindFramebuffer
  • setClientActiveTexture
  • useVbo
  • glCheckFramebufferStatus
  • glDeleteFramebuffers
  • glFramebufferRenderbuffer
  • glFramebufferTexture2D
  • glGenFramebuffers
  • glGenRenderbuffers
  • glGenFramebuffers,
  • glGenRenderbuffers,
  • glRenderbufferStorage,
  • areShadersSupported,
  • glAttachShader,
  • glBindRenderbuffer,
  • glCompileShader,
  • glCreateProgram,
  • glCreateShader

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now