Search in sources :

Example 91 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project BetterStorage by copygirl.

the class TileLockableDoor method registerBlockIcons.

@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
    iconUpper = iconRegister.registerIcon("door_iron_upper");
    iconLower = iconRegister.registerIcon("door_iron_lower");
    iconUpperFlipped = new IconFlipped(iconUpper, true, false);
    iconLowerFlipped = new IconFlipped(iconLower, true, false);
    blockIcon = iconUpper;
}
Also used : IconFlipped(net.minecraft.client.renderer.IconFlipped) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 92 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.

the class ItemSafariNet method addInformation.

@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "unchecked", "rawtypes" })
public void addInformation(ItemStack stack, EntityPlayer player, List infoList, boolean advancedTooltips) {
    if (stack.getTagCompound() == null) {
        return;
    }
    if (stack.itemID == MineFactoryReloadedCore.safariNetJailerItem.itemID) {
        infoList.add("Released creatures don't despawn normally");
    }
    if (stack.getTagCompound().getBoolean("hide")) {
        infoList.add("It is a mystery");
    } else {
        // See Entity.getEntityName()
        infoList.add(StatCollector.translateToLocal("entity." + stack.getTagCompound().getString("id") + ".name"));
        Class c = (Class) EntityList.stringToClassMapping.get(stack.getTagCompound().getString("id"));
        if (c == null) {
            return;
        }
        for (ISafariNetHandler handler : MFRRegistry.getSafariNetHandlers()) {
            if (handler.validFor().isAssignableFrom(c)) {
                handler.addInformation(stack, player, infoList, advancedTooltips);
            }
        }
    }
}
Also used : ISafariNetHandler(powercrystals.minefactoryreloaded.api.ISafariNetHandler) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 93 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.

the class ItemBlockFactoryMachine method addInformation.

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean par4) {
    NBTTagCompound c = stack.getTagCompound();
    if (getBlockID() == Machine.DeepStorageUnit.getBlockId() && stack.getItemDamage() == Machine.DeepStorageUnit.getMeta() && c != null) {
        int storedId = c.getInteger("storedId");
        int storedMeta = c.getInteger("storedMeta");
        int storedQuantity = c.getInteger("storedQuantity");
        if (storedId > 0 & storedQuantity > 0) {
            ItemStack storedItem = new ItemStack(storedId, 1, storedMeta);
            info.add("Contains " + storedQuantity + " " + Item.itemsList[storedId].getItemDisplayName(storedItem) + " (" + storedId + ":" + storedMeta + ")");
        } else {
        // info.add("Empty");
        }
    } else if (getBlockID() == Machine.BioFuelGenerator.getBlockId() && stack.getItemDamage() == Machine.BioFuelGenerator.getMeta()) {
        info.add("Produces MJ only.");
    }
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 94 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.

the class ItemBlockRedNetLogic method getSubItems.

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int itemId, CreativeTabs creativeTab, List subTypes) {
    subTypes.add(new ItemStack(itemId, 1, 0));
    subTypes.add(manual);
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 95 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.

the class WorldServerProxy method finishSetup.

@Override
@SideOnly(Side.CLIENT)
protected void finishSetup() {
    ArrayList<String> q = new ArrayList<String>();
    // forge-added, no reobf
    q.add("finishSetup");
    // q.addAll(Arrays.asList(ObfuscationReflectionHelper.remapFieldNames("net.minecraft.world.World", new String[]{""})));
    Method callable = ReflectionHelper.findMethod(World.class, this.proxiedWorld, q.toArray(new String[q.size()]));
    try {
        callable.invoke(this.proxiedWorld);
    } catch (Throwable e) {
    }
}
Also used : ArrayList(java.util.ArrayList) Method(java.lang.reflect.Method) 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