Search in sources :

Example 36 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.

the class BlockReinforcedDoor method registerBlockIcons.

@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_) {
    this.field_150017_a = new IIcon[2];
    this.field_150016_b = new IIcon[2];
    this.field_150017_a[0] = p_149651_1_.registerIcon("securitycraft:reinforcedDoorUpper");
    this.field_150016_b[0] = p_149651_1_.registerIcon("securitycraft:reinforcedDoorLower");
    this.field_150017_a[1] = new IconFlipped(this.field_150017_a[0], true, false);
    this.field_150016_b[1] = new IconFlipped(this.field_150016_b[0], true, false);
}
Also used : IconFlipped(net.minecraft.client.renderer.IconFlipped) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 37 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.

the class BlockReinforcedWood method getSubBlocks.

/**
     * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
     */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) {
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1));
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 2));
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 3));
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 4));
    p_149666_3_.add(new ItemStack(p_149666_1_, 1, 5));
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 38 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.

the class BlockScannerDoor method registerBlockIcons.

@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_) {
    this.field_150017_a = new IIcon[2];
    this.field_150016_b = new IIcon[2];
    this.field_150017_a[0] = p_149651_1_.registerIcon("securitycraft:scannerDoorUpper");
    this.field_150016_b[0] = p_149651_1_.registerIcon("securitycraft:reinforcedDoorLower");
    this.field_150017_a[1] = new IconFlipped(this.field_150017_a[0], true, false);
    this.field_150016_b[1] = new IconFlipped(this.field_150016_b[0], true, false);
}
Also used : IconFlipped(net.minecraft.client.renderer.IconFlipped) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 39 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project NyaSamaRailway by NSDN.

the class MinecartBase method func_70495_a.

@Override
@SideOnly(Side.CLIENT)
public Vec3 func_70495_a(double doubleX, double doubleY, double doubleZ, double v) {
    int x = MathHelper.floor_double(doubleX);
    int y = MathHelper.floor_double(doubleY);
    int z = MathHelper.floor_double(doubleZ);
    if (!BlockRailBase.func_150049_b_(this.worldObj, x, y, z) && BlockRailBase.func_150049_b_(this.worldObj, x, y - 1, z)) {
        --y;
    }
    Block block = this.worldObj.getBlock(x, y, z);
    if (!BlockRailBase.func_150051_a(block)) {
        return null;
    } else {
        int l = ((BlockRailBase) block).getBasicRailMetadata(worldObj, this, x, y, z);
        doubleY = (double) y;
        if (l >= 2 && l <= 5) {
            doubleY = (double) (y + 1);
        }
        int[][] aint = matrix[l];
        double d4 = (double) (aint[1][0] - aint[0][0]);
        double d5 = (double) (aint[1][2] - aint[0][2]);
        double d6 = Math.sqrt(d4 * d4 + d5 * d5);
        d4 /= d6;
        d5 /= d6;
        doubleX += d4 * v;
        doubleZ += d5 * v;
        if (aint[0][1] != 0 && MathHelper.floor_double(doubleX) - x == aint[0][0] && MathHelper.floor_double(doubleZ) - z == aint[0][2]) {
            doubleY += (double) aint[0][1];
        } else if (aint[1][1] != 0 && MathHelper.floor_double(doubleX) - x == aint[1][0] && MathHelper.floor_double(doubleZ) - z == aint[1][2]) {
            doubleY += (double) aint[1][1];
        }
        return this.func_70489_a(doubleX, doubleY, doubleZ);
    }
}
Also used : Block(net.minecraft.block.Block) BlockRailBase(net.minecraft.block.BlockRailBase) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 40 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project ClaySoldiersMod by SanAndreasP.

the class ItemHorseDoll method registerIcons.

@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
    Map<String, IIcon> names = Maps.newHashMap();
    this.p_icons = Maps.newEnumMap(EnumHorseType.class);
    for (EnumHorseType type : EnumHorseType.VALUES) {
        if (type.itemData == null) {
            continue;
        }
        if (!names.containsKey(type.itemData.getValue0())) {
            names.put(type.itemData.getValue0(), iconRegister.registerIcon(type.itemData.getValue0()));
        }
        this.p_icons.put(type, names.get(type.itemData.getValue0()));
    }
    this.p_pegasusWings = iconRegister.registerIcon(ClaySoldiersMod.MOD_ID + ":doll_pegasus_wing");
}
Also used : IIcon(net.minecraft.util.IIcon) EnumHorseType(de.sanandrew.mods.claysoldiers.util.mount.EnumHorseType) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

SideOnly (cpw.mods.fml.relauncher.SideOnly)204 ItemStack (net.minecraft.item.ItemStack)52 IIcon (net.minecraft.util.IIcon)17 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)17 Vec3dCube (uk.co.qmunity.lib.vec.Vec3dCube)13 Block (net.minecraft.block.Block)12 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)10 TileEntity (net.minecraft.tileentity.TileEntity)10 AxisAlignedBB (net.minecraft.util.AxisAlignedBB)9 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)8 ArrayList (java.util.ArrayList)8 Rotation (uk.co.qmunity.lib.transform.Rotation)8 AMParticle (am2.particles.AMParticle)6 IconFlipped (net.minecraft.client.renderer.IconFlipped)6 ItemBlock (net.minecraft.item.ItemBlock)6 Minecraft (net.minecraft.client.Minecraft)5 Tessellator (net.minecraft.client.renderer.Tessellator)5 EntityPlayer (net.minecraft.entity.player.EntityPlayer)5 GuiScreen (net.minecraft.client.gui.GuiScreen)4 RenderHelper (uk.co.qmunity.lib.client.render.RenderHelper)4