Search in sources :

Example 31 with SideOnly

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

the class BlockScannerDoor method registerIcons.

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

Example 32 with SideOnly

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

the class BlockReinforcedCompressedBlocks method getSubBlocks.

@Override
@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));
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 33 with SideOnly

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

the class BlockReinforcedMetals method getSubBlocks.

@Override
@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));
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 34 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)
 */
@Override
@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 35 with SideOnly

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

the class LookingGlassAPIProvider method createLookingGlassView.

/**
 * Creates an {@link IWorldView} object, then adds it to ClientProxy.worldViews.
 *
 * Only works on the CLIENT side.
 *
 * @param world The world we are in.
 * @param dimension The dimension to view. (0 = Overworld, -1 = Nether)
 * @param xCoord View X coordinate.
 * @param yCoord View Y coordinate.
 * @param zCoord View Z coordinate.
 * @param viewWidth View width in pixels.
 * @param viewHeight View height in pixels.
 */
@SideOnly(Side.CLIENT)
public static void createLookingGlassView(World world, int dimension, int xCoord, int yCoord, int zCoord, int viewWidth, int viewHeight) {
    if (!Loader.isModLoaded("LookingGlass"))
        return;
    IWorldView lgView = SecurityCraft.instance.getLGPanelRenderer().getApi().createWorldView(dimension, new ChunkCoordinates(xCoord, yCoord, zCoord), viewWidth, viewHeight);
    lgView.setAnimator(new CameraAnimatorSecurityCamera(lgView.getCamera(), xCoord, yCoord, zCoord, world.getBlockMetadata(xCoord, yCoord, zCoord)));
    if (!SecurityCraft.instance.hasViewForCoords(xCoord + " " + yCoord + " " + zCoord + " " + dimension)) {
        SecurityCraft.log("Inserting new view at" + Utils.getFormattedCoordinates(xCoord, yCoord, zCoord));
        ((ClientProxy) SecurityCraft.serverProxy).worldViews.put(xCoord + " " + yCoord + " " + zCoord + " " + dimension, new IWorldViewHelper(lgView));
    }
}
Also used : ChunkCoordinates(net.minecraft.util.ChunkCoordinates) IWorldView(com.xcompwiz.lookingglass.api.view.IWorldView) 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