cpw.mods.fml.relauncher.Side Java Examples

The following examples show how to use cpw.mods.fml.relauncher.Side. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ItemMachineUpgrade.java    From PneumaticCraft with GNU General Public License v3.0 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister){
    texture = new IIcon[UPGRADES_AMOUNT];
    texture[0] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_VOLUME);
    texture[1] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_DISPENSER);
    texture[2] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_ITEM_LIFE);
    texture[3] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_ENTITY_TRACKER);
    texture[4] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_BLOCK_TRACKER);
    texture[5] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_SPEED);
    texture[6] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_SEARCH);
    texture[7] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_COORDINATE_TRACKER);
    texture[8] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_RANGE);
    texture[9] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_SECURITY);
    texture[10] = par1IconRegister.registerIcon(Textures.ITEM_UPGRADE_THAUMCRAFT);
}
 
Example #2
Source File: ClientEventHandler.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void loadTextures(TextureStitchEvent.Pre event) {
	if (EtFuturum.enablePrismarine)
		if (event.map.getTextureType() == 0) {
			TextureAtlasSprite icon = new PrismarineIcon("prismarine_rough");
			if (event.map.setTextureEntry("prismarine_rough", icon))
				((PrismarineBlocks) ModBlocks.prismarine).setIcon(0, icon);
			else
				((PrismarineBlocks) ModBlocks.prismarine).setIcon(0, event.map.registerIcon("prismarine_rough"));
		}
}
 
Example #3
Source File: BlockLargePot.java    From GardenCollection with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons (IIconRegister iconRegister) {
    iconOverlayArray = new IIcon[256];
    for (int i = 1; i < iconOverlayArray.length; i++) {
        PatternConfig pattern = GardenContainers.config.getPattern(i);
        if (pattern != null && pattern.getOverlay() != null)
            iconOverlayArray[i] = iconRegister.registerIcon(GardenContainers.MOD_ID + ":" + pattern.getOverlay());
    }
}
 
Example #4
Source File: ItemMobCrystal.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister ir) {
    icons = new IIcon[2];

    icons[0] = ir.registerIcon("forbidden:emptycrystal");
    icons[1] = ir.registerIcon("forbidden:mobcrystal");
}
 
Example #5
Source File: PackBase.java    From SimplyJetpacks with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@SuppressWarnings("unchecked")
public void addSubItems(ItemPack item, int meta, List list) {
    if (!this.showInCreativeTab) {
        return;
    }
    if (this.showEmptyInCreativeTab) {
        list.add(new ItemStack(item, 1, meta));
    }
    ItemStack full = new ItemStack(item, 1, meta);
    item.addFuel(full, item.getMaxFuelStored(full), false);
    list.add(full);
}
 
Example #6
Source File: EntityRabbit.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void handleHealthUpdate(byte id) {
	if (id == 1) {
		createRunningParticles();
		field_175535_bn = 10;
		field_175540_bm = 0;
	} else
		super.handleHealthUpdate(id);
}
 
Example #7
Source File: FWBlock.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, net.minecraft.block.Block block, int modelId, RenderBlocks renderBlocks) {
	Block blockInstance = getBlockInstance(world, new Vector3D(x, y, z));
	Optional<StaticRenderer> staticRenderer = blockInstance.components.getOp(StaticRenderer.class);
	if (staticRenderer.isPresent()) {
		BWModel model = new BWModel();
		model.matrix = new MatrixStack().translate(x + 0.5, y + 0.5, z + 0.5);
		staticRenderer.get().onRender.accept(model);
		model.render(world);

		return Tessellator.instance.rawBufferIndex != 0; // Returns true if Tesselator is not empty. Avoids crash on empty Tesselator buffer.
	}
	return false;
}
 
Example #8
Source File: ItemPlasticElectronTube.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister){

    super.registerIcons(iconRegister);
    overlayTexture = iconRegister.registerIcon(getIconString() + "Overlay");
}
 
Example #9
Source File: MoCBlockDirt.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(int par1, CreativeTabs tab, List subItems) 
{
    for (int ix = 0; ix < MoCreatures.multiBlockNames.size(); ix++) 
    {
        subItems.add(new ItemStack(this, 1, ix));
    }
}
 
Example #10
Source File: CoordTrackUpgradeHandler.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void render3D(float partialTicks){
    if(coordTracker != null) {
        if(FMLClientHandler.instance().getClient().thePlayer.worldObj.provider.dimensionId != coordTracker.worldObj.provider.dimensionId) return;
        coordTracker.render(partialTicks);
        if(pathEnabled && navigator != null) {
            navigator.render(wirePath, xRayEnabled, partialTicks);
        }
    }
}
 
Example #11
Source File: ItemPack.java    From SimplyJetpacks with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("unchecked")
public void getSubItems(Item item, CreativeTabs tab, List list) {
    for (Entry<Integer, T> e : this.packs.entrySet()) {
        e.getValue().addSubItems(this, e.getKey(), list);
    }
}
 
Example #12
Source File: ItemGlasses.java    From OpenPeripheral-Addons with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "unchecked", "rawtypes" })
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
	Long guid = extractGuid(itemStack);
	if (guid != null) list.add(StatCollector.translateToLocalFormatted("openperipheral.misc.key", TerminalUtils.formatTerminalId(guid)));
}
 
Example #13
Source File: DarkResearchItem.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public String getText() {
    if (Config.tagResearch) {
        if (inter == null)
            return "[FM] " + StatCollector.translateToLocal("forbidden.research_text." + key);
        else
            return "[FM] " + inter + " " + StatCollector.translateToLocal("forbidden.research_text." + key);
    } else
        return StatCollector.translateToLocal("forbidden.research_text." + key);
}
 
Example #14
Source File: LiquidIcon.java    From OpenPeripheral-Addons with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
protected void drawContents(RenderState renderState, float partialTicks) {
	if (fluidIcon == null || iconWidth <= 0 || iconHeight <= 0) return;

	renderState.setupTexturedRender();
	renderState.setColor(0xFFFFFF, alpha);

	TextureManager render = FMLClientHandler.instance().getClient().renderEngine;
	render.bindTexture(TextureMap.locationBlocksTexture);
	float xIterations = width / iconWidth;
	float yIterations = height / iconHeight;

	for (float xIteration = 0; xIteration < xIterations; xIteration += 1) {
		for (float yIteration = 0; yIteration < yIterations; yIteration += 1) {
			// Draw whole or partial
			final float xDrawSize = Math.min(xIterations - xIteration, 1);
			final float yDrawSize = Math.min(yIterations - yIteration, 1);

			GlassesRenderingUtils.drawTexturedQuad(
					xIteration * iconWidth,
					yIteration * iconHeight,
					fluidIcon,
					xDrawSize * iconWidth,
					yDrawSize * iconHeight,
					xDrawSize,
					yDrawSize);
		}
	}
}
 
Example #15
Source File: BlockGauge.java    From archimedes-ships with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister)
{
	super.registerBlockIcons(iconregister);
	extendedIcon = iconregister.registerIcon(getTextureName() + "_ext");
}
 
Example #16
Source File: TileEntityBloomeryFurnace.java    From GardenCollection with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public int getBurnTimeRemainingScaled (int ceiling) {
    if (currentItemBurnTime == 0)
        currentItemBurnTime = 200;

    return ceiling * furnaceBurnTime / currentItemBurnTime;
}
 
Example #17
Source File: ItemPack.java    From SimplyJetpacks with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void addHUDInfo(List<String> list, ItemStack stack, boolean showFuel, boolean showState) {
    T pack = this.getPack(stack);
    if (pack != null) {
        if (showFuel && pack.hasFuelIndicator) {
            list.add(pack.getHUDFuelInfo(stack, this));
        }
        if (showState && pack.hasStateIndicators) {
            list.add(pack.getHUDStatesInfo(stack, this));
        }
    }
}
 
Example #18
Source File: MoCBlockDirt.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister par1IconRegister)
{
    icons = new Icon[MoCreatures.multiBlockNames.size()];
    
    for (int x = 0; x < MoCreatures.multiBlockNames.size(); x++)
    {
        icons[x] = par1IconRegister.registerIcon("mocreatures:" + "dirt_" + MoCreatures.multiBlockNames.get(x));
        //System.out.println("adding icon " + icons[x] + " with texture " + "mocreatures:" + "dirt_" +MoCreatures.multiBlockNames.get(x));
    }
    
}
 
Example #19
Source File: BlockMEDropper.java    From ExtraCells1 with MIT License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
{
	TileEntity tileentity = blockAccess.getBlockTileEntity(x, y, z);
	int metadata = blockAccess.getBlockMetadata(x, y, z);

	if (tileentity != null)
	{
		return side == metadata ? (metadata != 1 && metadata != 0 ? frontHorizontalIcon : frontVerticalIcon) : (metadata != 1 && metadata != 0 ? (side != 1 && side != 0 ? sideIcon : topIcon) : topIcon);
	}
	return null;
}
 
Example #20
Source File: ItemStoragePhysical.java    From ExtraCells1 with MIT License 5 votes vote down vote up
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	Boolean partitioned = Util.getCellRegistry().getHandlerForCell(stack).isPreformatted();
	Boolean fuzzy = Util.getCellRegistry().getHandlerForCell(stack).isFuzzyPreformatted();
	long used_bytes = Util.getCellRegistry().getHandlerForCell(stack).usedBytes();
	long total_bytes = Util.getCellRegistry().getHandlerForCell(stack).totalBytes();
	long used_types = Util.getCellRegistry().getHandlerForCell(stack).storedItemTypes();
	long total_types = Util.getCellRegistry().getHandlerForCell(stack).getTotalItemTypes();
	if (stack.getItemDamage() != 4)
	{
		list.add(used_bytes + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.Of") + " " + total_bytes + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.BytesUsed"));
		list.add(used_types + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.Of") + " " + total_types + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.Types"));
	} else if (stack.getItemDamage() == 4)
	{
		if (used_bytes != 0)
		{
			list.add(StatCollector.translateToLocal("tooltip.block") + ": " + Util.getCellRegistry().getHandlerForCell(stack).getAvailableItems().getItems().get(0).getDisplayName());
		} else
		{
			list.add(StatCollector.translateToLocal("tooltip.block") + ": -");
		}
		list.add(used_bytes + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.Of") + " " + total_bytes + " " + StatCollector.translateToLocal("Appeng.GuiITooltip.BytesUsed"));
	}
	if (partitioned)
	{
		if (fuzzy)
		{
			list.add(StatCollector.translateToLocal("Appeng.GuiITooltip.Partitioned") + " - " + StatCollector.translateToLocal("Appeng.GuiITooltip.Fuzzy"));
		} else
		{
			list.add(StatCollector.translateToLocal("Appeng.GuiITooltip.Partitioned") + " - " + StatCollector.translateToLocal("Appeng.GuiITooltip.Precise"));
		}
	}
}
 
Example #21
Source File: TippedArrow.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass) {
	PotionEffect effect = getEffect(stack);
	if (effect == null || effect.getPotionID() < 0 || effect.getPotionID() >= Potion.potionTypes.length)
		return super.getColorFromItemStack(stack, pass);
	return pass == 0 ? Potion.potionTypes[effect.getPotionID()].getLiquidColor() : super.getColorFromItemStack(stack, pass);
}
 
Example #22
Source File: ContainerNewBrewingStand.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void updateProgressBar(int id, int value) {
	if (id == 0)
		tile.func_145938_d(value);
	else if (id == 1)
		tile.setFuel(value);
	else if (id == 2)
		tile.setCurrentFuel(value);
}
 
Example #23
Source File: PacketTCNodeBolt.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(PacketTCNodeBolt p, MessageContext ctx) {
    FXLightningBolt bolt = new FXLightningBolt(Minecraft.getMinecraft().theWorld, p.x, p.y, p.z, p.targetX, p.targetY, p.targetZ, Minecraft.getMinecraft().theWorld.rand.nextLong(), 10, 4.0F, 5);
    bolt.defaultFractal();
    bolt.setType(p.type);
    bolt.finalizeBolt();
    return null;
}
 
Example #24
Source File: MoCBlockRock.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister par1IconRegister)
{
    icons = new Icon[MoCreatures.multiBlockNames.size()];
    
    for (int x = 0; x < MoCreatures.multiBlockNames.size(); x++)
    {
        icons[x] = par1IconRegister.registerIcon("mocreatures:" + "rock_" + MoCreatures.multiBlockNames.get(x));
    }
    
}
 
Example #25
Source File: PacketMEBattery.java    From ExtraCells1 with MIT License 5 votes vote down vote up
@Override
public void execute(EntityPlayer player, Side side) throws ProtocolException
{
	if (side.isServer())
	{
		TileEntityMEBattery tile = (TileEntityMEBattery) world.getBlockTileEntity(x, y, z);
		tile.updateGuiTile(playername);
	}
}
 
Example #26
Source File: ItemGluttonyShard.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister ir) {
    this.icon = ir.registerIcon("forbidden:gluttonyshard");
}
 
Example #27
Source File: DarkResearchItem.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public String getName() {
    return StatCollector.translateToLocal("forbidden.research_name." + key);
}
 
Example #28
Source File: OmniOcular.java    From OmniOcular with Apache License 2.0 4 votes vote down vote up
@NetworkCheckHandler
public static boolean check(Map<String, String> remote, Side side) {
    return !(side == Side.SERVER && !remote.isEmpty() && !remote.containsKey(Reference.MOD_ID));
}
 
Example #29
Source File: MovingBlock.java    From Framez with GNU General Public License v3.0 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void scheduleReRender() {

    renderList = -1;
}
 
Example #30
Source File: ItemMorphPickaxe.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) {
    return renderPass != 1 ? icon[0] : icon[1];
}