Examples of TileEntityAphorismTile


Examples of pneumaticCraft.common.tileentity.TileEntityAphorismTile

import cpw.mods.fml.client.FMLClientHandler;

public class RenderAphorismTile extends TileEntitySpecialRenderer{
    @Override
    public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f){
        TileEntityAphorismTile tile = (TileEntityAphorismTile)tileentity;
        GL11.glPushMatrix(); // start
        GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
        GL11.glScalef(1.0F, -1F, -1F);
        PneumaticCraftUtils.rotateMatrixByMetadata(tile.getBlockMetadata());
        GL11.glTranslatef(0, 1, 0.5F - BBConstants.APHORISM_TILE_THICKNESS - 0.01F);
        List<String> textLines = tile.getTextLines();
        int lineWidth = getMaxLineWidth(textLines);
        int lineHeight = 10 * textLines.size();
        float textScale = Math.min(14 / 16F / lineWidth, 14 / 16F / lineHeight);
        GL11.glScalef(textScale, textScale, textScale);
        GL11.glRotatef(tile.textRotation * 90, 0, 0, 1);
View Full Code Here

Examples of pneumaticCraft.common.tileentity.TileEntityAphorismTile

    @Override
    public boolean rotateBlock(World world, EntityPlayer player, int x, int y, int z, ForgeDirection face){
        if(!player.isSneaking()) {
            TileEntity tile = world.getTileEntity(x, y, z);
            if(tile instanceof TileEntityAphorismTile) {
                TileEntityAphorismTile teAt = (TileEntityAphorismTile)tile;
                if(++teAt.textRotation > 3) teAt.textRotation = 0;
                teAt.sendDescriptionPacket();
                return true;
            } else {
                return false;
            }
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.