Java Code Examples for net.minecraft.init.Blocks.standing_banner()

The following are Jave code examples for showing how to use standing_banner() of the net.minecraft.init.Blocks class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DecompiledMinecraft   File: ItemBanner.java   Source Code and License Vote up 5 votes
public ItemBanner()
{
    super(Blocks.standing_banner);
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.tabDecorations);
    this.setHasSubtypes(true);
    this.setMaxDamage(0);
}
 
Example 2
Project: DecompiledMinecraft   File: ItemBanner.java   Source Code and License Vote up 5 votes
public ItemBanner()
{
    super(Blocks.standing_banner);
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.tabDecorations);
    this.setHasSubtypes(true);
    this.setMaxDamage(0);
}
 
Example 3
Project: BaseClient   File: ItemBanner.java   Source Code and License Vote up 5 votes
public ItemBanner()
{
    super(Blocks.standing_banner);
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.tabDecorations);
    this.setHasSubtypes(true);
    this.setMaxDamage(0);
}
 
Example 4
Project: BaseClient   File: ItemBanner.java   Source Code and License Vote up 5 votes
public ItemBanner()
{
    super(Blocks.standing_banner);
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.tabDecorations);
    this.setHasSubtypes(true);
    this.setMaxDamage(0);
}
 
Example 5
Project: DecompiledMinecraft   File: BlockModelShapes.java   Source Code and License Vote up 4 votes
public TextureAtlasSprite getTexture(IBlockState state)
{
    Block block = state.getBlock();
    IBakedModel ibakedmodel = this.getModelForState(state);

    if (ibakedmodel == null || ibakedmodel == this.modelManager.getMissingModel())
    {
        if (block == Blocks.wall_sign || block == Blocks.standing_sign || block == Blocks.chest || block == Blocks.trapped_chest || block == Blocks.standing_banner || block == Blocks.wall_banner)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/planks_oak");
        }

        if (block == Blocks.ender_chest)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/obsidian");
        }

        if (block == Blocks.flowing_lava || block == Blocks.lava)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/lava_still");
        }

        if (block == Blocks.flowing_water || block == Blocks.water)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/water_still");
        }

        if (block == Blocks.skull)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/soul_sand");
        }

        if (block == Blocks.barrier)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:items/barrier");
        }
    }

    if (ibakedmodel == null)
    {
        ibakedmodel = this.modelManager.getMissingModel();
    }

    return ibakedmodel.getParticleTexture();
}
 
Example 6
Project: DecompiledMinecraft   File: TileEntityBannerRenderer.java   Source Code and License Vote up 4 votes
public void renderTileEntityAt(TileEntityBanner te, double x, double y, double z, float partialTicks, int destroyStage)
{
    boolean flag = te.getWorld() != null;
    boolean flag1 = !flag || te.getBlockType() == Blocks.standing_banner;
    int i = flag ? te.getBlockMetadata() : 0;
    long j = flag ? te.getWorld().getTotalWorldTime() : 0L;
    GlStateManager.pushMatrix();
    float f = 0.6666667F;

    if (flag1)
    {
        GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
        float f1 = (float)(i * 360) / 16.0F;
        GlStateManager.rotate(-f1, 0.0F, 1.0F, 0.0F);
        this.bannerModel.bannerStand.showModel = true;
    }
    else
    {
        float f2 = 0.0F;

        if (i == 2)
        {
            f2 = 180.0F;
        }

        if (i == 4)
        {
            f2 = 90.0F;
        }

        if (i == 5)
        {
            f2 = -90.0F;
        }

        GlStateManager.translate((float)x + 0.5F, (float)y - 0.25F * f, (float)z + 0.5F);
        GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.0F, -0.3125F, -0.4375F);
        this.bannerModel.bannerStand.showModel = false;
    }

    BlockPos blockpos = te.getPos();
    float f3 = (float)(blockpos.getX() * 7 + blockpos.getY() * 9 + blockpos.getZ() * 13) + (float)j + partialTicks;
    this.bannerModel.bannerSlate.rotateAngleX = (-0.0125F + 0.01F * MathHelper.cos(f3 * (float)Math.PI * 0.02F)) * (float)Math.PI;
    GlStateManager.enableRescaleNormal();
    ResourceLocation resourcelocation = this.func_178463_a(te);

    if (resourcelocation != null)
    {
        this.bindTexture(resourcelocation);
        GlStateManager.pushMatrix();
        GlStateManager.scale(f, -f, -f);
        this.bannerModel.renderBanner();
        GlStateManager.popMatrix();
    }

    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
}
 
Example 7
Project: BaseClient   File: BlockModelShapes.java   Source Code and License Vote up 4 votes
public TextureAtlasSprite getTexture(IBlockState state)
{
    Block block = state.getBlock();
    IBakedModel ibakedmodel = this.getModelForState(state);

    if (ibakedmodel == null || ibakedmodel == this.modelManager.getMissingModel())
    {
        if (block == Blocks.wall_sign || block == Blocks.standing_sign || block == Blocks.chest || block == Blocks.trapped_chest || block == Blocks.standing_banner || block == Blocks.wall_banner)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/planks_oak");
        }

        if (block == Blocks.ender_chest)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/obsidian");
        }

        if (block == Blocks.flowing_lava || block == Blocks.lava)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/lava_still");
        }

        if (block == Blocks.flowing_water || block == Blocks.water)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/water_still");
        }

        if (block == Blocks.skull)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/soul_sand");
        }

        if (block == Blocks.barrier)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:items/barrier");
        }
    }

    if (ibakedmodel == null)
    {
        ibakedmodel = this.modelManager.getMissingModel();
    }

    return ibakedmodel.getParticleTexture();
}
 
Example 8
Project: BaseClient   File: TileEntityBannerRenderer.java   Source Code and License Vote up 4 votes
public void renderTileEntityAt(TileEntityBanner te, double x, double y, double z, float partialTicks, int destroyStage)
{
    boolean flag = te.getWorld() != null;
    boolean flag1 = !flag || te.getBlockType() == Blocks.standing_banner;
    int i = flag ? te.getBlockMetadata() : 0;
    long j = flag ? te.getWorld().getTotalWorldTime() : 0L;
    GlStateManager.pushMatrix();
    float f = 0.6666667F;

    if (flag1)
    {
        GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
        float f1 = (float)(i * 360) / 16.0F;
        GlStateManager.rotate(-f1, 0.0F, 1.0F, 0.0F);
        this.bannerModel.bannerStand.showModel = true;
    }
    else
    {
        float f2 = 0.0F;

        if (i == 2)
        {
            f2 = 180.0F;
        }

        if (i == 4)
        {
            f2 = 90.0F;
        }

        if (i == 5)
        {
            f2 = -90.0F;
        }

        GlStateManager.translate((float)x + 0.5F, (float)y - 0.25F * f, (float)z + 0.5F);
        GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.0F, -0.3125F, -0.4375F);
        this.bannerModel.bannerStand.showModel = false;
    }

    BlockPos blockpos = te.getPos();
    float f3 = (float)(blockpos.getX() * 7 + blockpos.getY() * 9 + blockpos.getZ() * 13) + (float)j + partialTicks;
    this.bannerModel.bannerSlate.rotateAngleX = (-0.0125F + 0.01F * MathHelper.cos(f3 * (float)Math.PI * 0.02F)) * (float)Math.PI;
    GlStateManager.enableRescaleNormal();
    ResourceLocation resourcelocation = this.func_178463_a(te);

    if (resourcelocation != null)
    {
        this.bindTexture(resourcelocation);
        GlStateManager.pushMatrix();
        GlStateManager.scale(f, -f, -f);
        this.bannerModel.renderBanner();
        GlStateManager.popMatrix();
    }

    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
}
 
Example 9
Project: BaseClient   File: BlockModelShapes.java   Source Code and License Vote up 4 votes
public TextureAtlasSprite getTexture(IBlockState state)
{
    Block block = state.getBlock();
    IBakedModel ibakedmodel = this.getModelForState(state);

    if (ibakedmodel == null || ibakedmodel == this.modelManager.getMissingModel())
    {
        if (block == Blocks.wall_sign || block == Blocks.standing_sign || block == Blocks.chest || block == Blocks.trapped_chest || block == Blocks.standing_banner || block == Blocks.wall_banner)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/planks_oak");
        }

        if (block == Blocks.ender_chest)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/obsidian");
        }

        if (block == Blocks.flowing_lava || block == Blocks.lava)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/lava_still");
        }

        if (block == Blocks.flowing_water || block == Blocks.water)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/water_still");
        }

        if (block == Blocks.skull)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:blocks/soul_sand");
        }

        if (block == Blocks.barrier)
        {
            return this.modelManager.getTextureMap().getAtlasSprite("minecraft:items/barrier");
        }
    }

    if (ibakedmodel == null)
    {
        ibakedmodel = this.modelManager.getMissingModel();
    }

    return ibakedmodel.getParticleTexture();
}
 
Example 10
Project: BaseClient   File: TileEntityBannerRenderer.java   Source Code and License Vote up 4 votes
public void renderTileEntityAt(TileEntityBanner te, double x, double y, double z, float partialTicks, int destroyStage)
{
    boolean flag = te.getWorld() != null;
    boolean flag1 = !flag || te.getBlockType() == Blocks.standing_banner;
    int i = flag ? te.getBlockMetadata() : 0;
    long j = flag ? te.getWorld().getTotalWorldTime() : 0L;
    GlStateManager.pushMatrix();
    float f = 0.6666667F;

    if (flag1)
    {
        GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f, (float)z + 0.5F);
        float f1 = (float)(i * 360) / 16.0F;
        GlStateManager.rotate(-f1, 0.0F, 1.0F, 0.0F);
        this.bannerModel.bannerStand.showModel = true;
    }
    else
    {
        float f2 = 0.0F;

        if (i == 2)
        {
            f2 = 180.0F;
        }

        if (i == 4)
        {
            f2 = 90.0F;
        }

        if (i == 5)
        {
            f2 = -90.0F;
        }

        GlStateManager.translate((float)x + 0.5F, (float)y - 0.25F * f, (float)z + 0.5F);
        GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.0F, -0.3125F, -0.4375F);
        this.bannerModel.bannerStand.showModel = false;
    }

    BlockPos blockpos = te.getPos();
    float f3 = (float)(blockpos.getX() * 7 + blockpos.getY() * 9 + blockpos.getZ() * 13) + (float)j + partialTicks;
    this.bannerModel.bannerSlate.rotateAngleX = (-0.0125F + 0.01F * MathHelper.cos(f3 * (float)Math.PI * 0.02F)) * (float)Math.PI;
    GlStateManager.enableRescaleNormal();
    ResourceLocation resourcelocation = this.func_178463_a(te);

    if (resourcelocation != null)
    {
        this.bindTexture(resourcelocation);
        GlStateManager.pushMatrix();
        GlStateManager.scale(f, -f, -f);
        this.bannerModel.renderBanner();
        GlStateManager.popMatrix();
    }

    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
}