本文整理了Java中net.minecraft.client.Minecraft.getTextureMapBlocks()
方法的一些代码示例,展示了Minecraft.getTextureMapBlocks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.getTextureMapBlocks()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:getTextureMapBlocks
暂无
代码示例来源:origin: Vazkii/Botania
@Nonnull
@Override
public TextureAtlasSprite getParticleTexture() {
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("botania:blocks/livingwood0");
}
代码示例来源:origin: Vazkii/Botania
@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/dirt"); }
@Nonnull @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
代码示例来源:origin: Vazkii/Botania
@Nonnull @Override public TextureAtlasSprite getParticleTexture() { return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("botania:items/lexicon"); }
@SuppressWarnings("deprecation") @Nonnull @Override public ItemCameraTransforms getItemCameraTransforms() { return ItemCameraTransforms.DEFAULT; }
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@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() );
}
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
public void addFace(EnumFacing facing, TextureAtlasSprite sprite) {
if (sprite != Minecraft.getMinecraft().getTextureMapBlocks().missingImage) {
faces.add(new ModelBakerFace(facing, colorIndex, sprite));
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
public HalfBakedQuad(@Nonnull BoundingBox bb, @Nonnull EnumFacing face, float umin, float umax, float vmin, float vmax, @Nullable TextureAtlasSprite tex,
@Nullable Vector4f color) {
this.corners = bb.getCornersWithUvForFace(face, umin, umax, vmin, vmax);
this.tex = tex != null ? tex : Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();
this.color = color != null ? color : NO_COLOR;
this.face = face;
}
代码示例来源:origin: TheGreyGhost/MinecraftByExample
@Override
public TextureAtlasSprite getParticleTexture() {
TextureAtlasSprite textureAtlasSprite = Minecraft.getMinecraft().getTextureMapBlocks()
.getAtlasSprite("minecraftbyexample:blocks/mbe05_block_3d_web");
return textureAtlasSprite;
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
public TextureAtlasSprite apply(@Nullable ResourceLocation location) {
Preconditions.checkNotNull(location);
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
}
代码示例来源:origin: Vazkii/Botania
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();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@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 );
}
}
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
@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);
}
}
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
public TextureAtlasSprite getParticleTexture() {
if (blockModel != null) {
return blockModel.getParticleTexture();
}
return Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
public TextureAtlasSprite getParticleTexture() {
if (blockModel != null) {
return blockModel.getParticleTexture();
}
return Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
@SideOnly(Side.CLIENT)
public void registerSprites() {
if (overlay != null) {
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
map.registerSprite(overlay.sprite);
}
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
@SideOnly(Side.CLIENT)
public void registerSprites() {
String spriteName = getItemTexture();
TextureMap textureMap = Minecraft.getMinecraft().getTextureMapBlocks();
textureMap.registerSprite(new ResourceLocation(spriteName));
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
private void renderFluid(FluidStack f, int x, int y) {
ResourceLocation iconKey = f.getFluid().getStill();
TextureAtlasSprite icon = Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(iconKey.toString());
if (icon != null) {
RenderUtil.renderGuiTank(f, 1000, 1000, x + 1, y + 1, 0, 16, 16);
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
private void renderFluid(FluidStack f, int x, int y) {
ResourceLocation iconKey = f.getFluid().getStill();
TextureAtlasSprite icon = Minecraft.getMinecraft().getTextureMapBlocks().getTextureExtry(iconKey.toString());
if (icon != null) {
RenderUtil.renderGuiTank(f, 1000, 1000, x + 1, y + 1, 0, 32, 32);
}
}
代码示例来源:origin: ForestryMC/ForestryMC
@SideOnly(Side.CLIENT)
private void registerSprites() {
TextureMap textureMapBlocks = Minecraft.getMinecraft().getTextureMapBlocks();
textureMapBlocks.registerSprite(plain);
textureMapBlocks.registerSprite(fancy);
textureMapBlocks.registerSprite(pollinatedPlain);
textureMapBlocks.registerSprite(pollinatedFancy);
}
代码示例来源:origin: ForestryMC/ForestryMC
@SideOnly(Side.CLIENT)
@Override
public void registerSprites(ITextureManager manager) {
IMachineProperties<?> machineProperties = blockType.getMachineProperties();
if (machineProperties instanceof IMachinePropertiesTesr) {
TextureMap textureMapBlocks = Minecraft.getMinecraft().getTextureMapBlocks();
String particleTextureLocation = ((IMachinePropertiesTesr) machineProperties).getParticleTextureLocation();
textureMapBlocks.registerSprite(new ResourceLocation(particleTextureLocation));
}
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
final Fluid fluid = fs.getFluid();
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
final TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite( fluid.getStill().toString() );
内容来源于网络,如有侵权,请联系作者删除!