@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("botania:blocks/livingwood0"); }
@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/dirt"); } @Nonnull @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("botania:items/lexicon"); } @SuppressWarnings("deprecation") @Nonnull @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
@Override public void drawContent( final Minecraft mc, final int mouseX, final int mouseY, final float partialTicks ) { final IAEFluidStack fs = this.getFluidStack(); if( fs != null ) { GlStateManager.disableLighting(); GlStateManager.disableBlend(); final Fluid fluid = fs.getFluid(); mc.getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ); final TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite( fluid.getStill().toString() ); // Set color for dynamic fluids // Convert int color to RGB final float red = ( fluid.getColor() >> 16 & 255 ) / 255.0F; final float green = ( fluid.getColor() >> 8 & 255 ) / 255.0F; final float blue = ( fluid.getColor() & 255 ) / 255.0F; GlStateManager.color( red, green, blue ); this.drawTexturedModalRect( this.xPos(), this.yPos(), sprite, this.getWidth(), this.getHeight() ); } }
@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("wizardry:items/book"); }
@Override public TextureAtlasSprite getParticleTexture() { TextureAtlasSprite textureAtlasSprite = Minecraft.getMinecraft().getTextureMapBlocks() .getAtlasSprite("minecraftbyexample:blocks/mbe05_block_3d_web"); return textureAtlasSprite; }
@Override public TextureAtlasSprite apply(@Nullable ResourceLocation location) { Preconditions.checkNotNull(location); return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString()); }
@Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite( ChiselsAndBits.MODID + ":item/" + itemName ); } }
public void renderIcon(int par1, int par2, ResourceLocation loc, int par4, int par5, int brightness) { TextureAtlasSprite par3Icon = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(loc.toString()); Tessellator tessellator = Tessellator.getInstance(); tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); //if(brightness != -1) //tessellator.getBuffer().putBrightness4(brightness, brightness, brightness, brightness); tessellator.getBuffer().pos(par1 + 0, par2 + par5, 0).tex(par3Icon.getMinU(), par3Icon.getMaxV()).endVertex(); tessellator.getBuffer().pos(par1 + par4, par2 + par5, 0).tex(par3Icon.getMaxU(), par3Icon.getMaxV()).endVertex(); tessellator.getBuffer().pos(par1 + par4, par2 + 0, 0).tex(par3Icon.getMaxU(), par3Icon.getMinV()).endVertex(); tessellator.getBuffer().pos(par1 + 0, par2 + 0, 0).tex(par3Icon.getMinU(), par3Icon.getMinV()).endVertex(); tessellator.draw(); }
@Override public void drawButton( final Minecraft mc, final int mouseX, final int mouseY, final float partialTicks ) { if( this.visible ) { GlStateManager.disableBlend(); GlStateManager.disableLighting(); drawRect( this.x, this.y, this.x + this.width, this.y + this.height, AEColor.GRAY.blackVariant | 0xFF000000 ); final IAEFluidStack fluid = this.tank.getFluidInSlot( this.slot ); if( fluid != null && fluid.getStackSize() > 0 ) { mc.getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ); float red = ( fluid.getFluid().getColor() >> 16 & 255 ) / 255.0F; float green = ( fluid.getFluid().getColor() >> 8 & 255 ) / 255.0F; float blue = ( fluid.getFluid().getColor() & 255 ) / 255.0F; GlStateManager.color( red, green, blue ); TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite( fluid.getFluid().getStill().toString() ); final int scaledHeight = (int) ( this.height * ( (float) fluid.getStackSize() / this.tank.getTankProperties()[this.slot].getCapacity() ) ); int iconHeightRemainder = scaledHeight % 16; if( iconHeightRemainder > 0 ) { this.drawTexturedModalRect( this.x, this.y + this.height - iconHeightRemainder, sprite, 16, iconHeightRemainder ); } for( int i = 0; i < scaledHeight / 16; i++ ) { this.drawTexturedModalRect( this.x, this.y + this.height - iconHeightRemainder - ( i + 1 ) * 16, sprite, 16, 16 ); } } } }
@Override public TextureAtlasSprite apply(@Nullable ResourceLocation location) { String locationString = location == null ? "" : location.toString(); if (locationString.endsWith("PAINT")) { return super.apply(location); } else { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(locationString); } } }
/** * Before the texture stitching. * @param event The received event. */ @SubscribeEvent @SideOnly(Side.CLIENT) public void onTextureHookPre(TextureStitchEvent.Pre event) { RenderHelpers.EMPTYICON = event.getMap().getAtlasSprite(Reference.MOD_ID+":"+EMPTY_ICON_NAME); } }
/** * @reason Adds the fire texture to the list of textures used this * tick such that it can be animated next tick. */ @Inject(method = "renderEntityOnFire", at = @At("HEAD")) private void addFireTextureOnRenderEntityOnFire(Entity entity, double x, double y, double z, float partialTicks, CallbackInfo ci) { TextureMap textureMapBlocks = Minecraft.getMinecraft().getTextureMapBlocks(); ((IPatchedTextureAtlasSprite) textureMapBlocks.getAtlasSprite("minecraft:blocks/fire_layer_0")).markNeedsAnimationUpdate(); ((IPatchedTextureAtlasSprite) textureMapBlocks.getAtlasSprite("minecraft:blocks/fire_layer_1")).markNeedsAnimationUpdate(); } }
@Override public TextureAtlasSprite apply(ResourceLocation location) { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString()); } };
@Overwrite(remap = false) public MixinMagicStitchingSprite(String spriteName) { super(spriteName); parent = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(spriteName); postStitch(); } }
public static void prebakeModel() { if(bakedModel == null) { try { model = ModelLoaderRegistry.getModel(new ResourceLocation(CompactMachines3.MODID, "block/fieldprojectordish")); } catch (Exception e) { throw new RuntimeException(e); } bakedModel = model.bake(TRSRTransformation.identity(), DefaultVertexFormats.ITEM, location -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("compactmachines3:blocks/fieldprojector")); } }
@Override @SideOnly(Side.CLIENT) protected void setTexture(ParticleDigging fx, World world, BlockPos pos, IBlockState state) { IMachineProperties<?> machineProperties = blockType.getMachineProperties(); if (machineProperties instanceof IMachinePropertiesTesr) { Minecraft minecraft = Minecraft.getMinecraft(); TextureMap textureMapBlocks = minecraft.getTextureMapBlocks(); IMachinePropertiesTesr machinePropertiesTesr = (IMachinePropertiesTesr) machineProperties; String particleTextureLocation = machinePropertiesTesr.getParticleTextureLocation(); TextureAtlasSprite particleTexture = textureMapBlocks.getAtlasSprite(particleTextureLocation); fx.setParticleTexture(particleTexture); } }
final Fluid fluid = fs.getFluid(); Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ); final TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite( fluid.getStill().toString() );
private Key createEmptyKey(TextureMap map, boolean fancy) { IAlleleTreeSpecies oakSpecies = TreeDefinition.Oak.getIndividual().getGenome().getPrimary(); ResourceLocation spriteLocation = oakSpecies.getLeafSpriteProvider().getSprite(false, fancy); TextureAtlasSprite sprite = map.getAtlasSprite(spriteLocation.toString()); return new Key(sprite, null, fancy); }
@SideOnly(Side.CLIENT) public static void renderItemCurrentGui(ItemStack stack, int x, int y, int dim) { // first get texture from item stack IBakedModel iBakedModel = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(stack); TextureAtlasSprite textureAtlasSprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(iBakedModel.getParticleTexture().getIconName()); Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); if (Minecraft.getMinecraft().currentScreen != null) { Minecraft.getMinecraft().currentScreen.drawTexturedModalRect(x, y, textureAtlasSprite, dim, dim); } } }