net.minecraftforge.fml.relauncher.SideOnly Java Examples

The following examples show how to use net.minecraftforge.fml.relauncher.SideOnly. 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: TofuEntityRegister.java    From TofuCraftReload with MIT License 8 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void entityRender() {
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuCow.class, RenderTofuCow::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuSlime.class, RenderTofuSlime::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofunian.class, RenderTofunian::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuChinger.class, RenderTofuChinger::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuSpider.class, RenderTofuSpider::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityFukumame.class, RenderFukumame::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityZundaArrow.class, RenderZundaArrow::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuFish.class, RenderTofuFish::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuTurret.class, RenderTofuTurret::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityBeam.class, RenderBeam::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuMindCore.class, RenderTofuMindCore::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTofuGandlem.class, RenderTofuGandlem::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityFallTofu.class, RenderFallTofu::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityTippedChingerArrow.class, RenderTippedChingerArrow::new);
}
 
Example #2
Source File: BlockMapleLeaveRed.java    From Sakura_mod with MIT License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) {
	Blocks.LEAVES.randomDisplayTick(stateIn, worldIn, pos, rand);
    if (rand.nextInt(40) == 0) {
        int j = rand.nextInt(2) * 2 - 1;
        int k = rand.nextInt(2) * 2 - 1;

        double d0 = pos.getX() + 0.5D + 0.25D * j;
        double d1 = pos.getY() - 0.15D;
        double d2 = pos.getZ() + 0.5D + 0.25D * k;
        double d3 = rand.nextFloat() * j * 0.1D;
        double d4 = ((rand.nextFloat()) * 0.055D) + 0.015D;
        double d5 = rand.nextFloat() * k * 0.1D;

        SakuraMain.proxy.spawnParticle(SakuraParticleType.MAPLERED, d0, d1, d2, d3, -d4, d5);
    }
}
 
Example #3
Source File: BlockSoyMilk.java    From TofuCraftReload with MIT License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
    super.randomDisplayTick(state, world, pos, rand);
    if (world.getBlockState(pos.up()).getMaterial() != Material.WATER && rand.nextInt(3) == 0)
    {
        if (this.getHeatStrength(world, pos) > 0)
        {
            float steamX = pos.getX() + 0.5F;
            float steamY = pos.getY() + 0.9F;
            float steamZ = pos.getZ() + 0.5F;
            float steamRandX = rand.nextFloat() * 0.6F - 0.3F;
            float steamRandZ = rand.nextFloat() * 0.6F - 0.3F;
            double gRand1 = rand.nextGaussian() * 0.01D;
            double gRand2 = rand.nextGaussian() * 0.01D;
            double gRand3 = rand.nextGaussian() * 0.01D;
            world.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, (steamX + steamRandX), steamY, (steamZ + steamRandZ), gRand1, gRand2, gRand3);
        }
    }
}
 
Example #4
Source File: HarvesterAnimationStateMachine.java    From EmergingTechnology with MIT License 6 votes vote down vote up
/**
 * Load a new instance of HarvesterAnimationStateMachine at specified location,
 * with specified custom parameters.
 */
@SideOnly(Side.CLIENT)
public static HarvesterAnimationStateMachine load(IResourceManager manager, ResourceLocation location,
        ImmutableMap<String, ITimeValue> customParameters) {
    try (IResource resource = manager.getResource(location)) {
        ClipResolver clipResolver = new ClipResolver();
        ParameterResolver parameterResolver = new ParameterResolver(customParameters);
        Clips.CommonClipTypeAdapterFactory.INSTANCE.setClipResolver(clipResolver);
        TimeValues.CommonTimeValueTypeAdapterFactory.INSTANCE.setValueResolver(parameterResolver);
        HarvesterAnimationStateMachine asm = asmGson.fromJson(
                new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8),
                HarvesterAnimationStateMachine.class);
        clipResolver.asm = asm;
        parameterResolver.asm = asm;
        asm.initialize();

        return asm;
    } catch (IOException | JsonParseException e) {
        FMLLog.log.error("Exception loading Animation State Machine {}, skipping", location, e);
        return missing;
    } finally {
        Clips.CommonClipTypeAdapterFactory.INSTANCE.setClipResolver(null);
        TimeValues.CommonTimeValueTypeAdapterFactory.INSTANCE.setValueResolver(null);
    }
}
 
Example #5
Source File: CommunityMod.java    From CommunityMod with GNU Lesser General Public License v2.1 6 votes vote down vote up
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onItemTooltip(ItemTooltipEvent event)
{
    ItemStack stack = event.getItemStack();

    if (!stack.isEmpty() && CommunityGlobals.MOD_ID.equals(stack.getItem().getRegistryName().getNamespace()))
    {
        SubModContainer subMod = SubModLoader.getSubModOrigin(stack.getItem());

        if (subMod != null)
        {
            event.getToolTip().add(TextFormatting.DARK_GRAY + "(" + subMod.getName() + " - " + subMod.getAttribution() + ")");
        }
    }
}
 
Example #6
Source File: CarbonDioxideBlock.java    From EmergingTechnology with MIT License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public Vec3d getFogColor(World world, BlockPos pos, IBlockState state, Entity entity, Vec3d originalColor,
        float partialTicks) {
    if (!isWithinFluid(world, pos, ActiveRenderInfo.projectViewFromEntity(entity, partialTicks))) {
        BlockPos otherPos = pos.down(densityDir);
        IBlockState otherState = world.getBlockState(otherPos);
        return otherState.getBlock().getFogColor(world, otherPos, otherState, entity, originalColor, partialTicks);
    }

    if (getFluid() != null) {
        return new Vec3d(5.0F, 5.0F, 5.0F);
    }

    return super.getFogColor(world, pos, state, entity, originalColor, partialTicks);
}
 
Example #7
Source File: BlockMapleLeaveYellow.java    From Sakura_mod with MIT License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) {
	Blocks.LEAVES.randomDisplayTick(stateIn, worldIn, pos, rand);
    if (rand.nextInt(40) == 0) {
        int j = rand.nextInt(2) * 2 - 1;
        int k = rand.nextInt(2) * 2 - 1;

        double d0 = pos.getX() + 0.5D + 0.25D * j;
        double d1 = pos.getY() - 0.15D;
        double d2 = pos.getZ() + 0.5D + 0.25D * k;
        double d3 = rand.nextFloat() * j * 0.1D;
        double d4 = ((rand.nextFloat()) * 0.055D) + 0.015D;
        double d5 = rand.nextFloat() * k * 0.1D;

        SakuraMain.proxy.spawnParticle(SakuraParticleType.MAPLEYELLOW, d0, d1, d2, d3, -d4, d5);
    }
}
 
Example #8
Source File: TidalGeneratorTileEntity.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void setTurbineStateClient(TurbineSpeedEnum speed) {

    String state = this.getAnimator().currentState();
    String newState = TidalHelper.getTurbineStateFromSpeedEnum(speed);

    if (!state.equalsIgnoreCase(newState)) {
        this.getAnimator().transition(newState);
    }
}
 
Example #9
Source File: SexyFont.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("deprecation") //how to mod 101
public void onInit(FMLInitializationEvent event) {
	IReloadableResourceManager mgr = ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager());
	
	mgr.registerReloadListener((x) -> {
		Minecraft mc = Minecraft.getMinecraft();
		
		mc.fontRenderer = new SexyFontRenderer(
			mc.gameSettings,
			new ResourceLocation("textures/font/ascii.png"),
			mc.renderEngine,
			mc.isUnicode()
		);
	});
}
 
Example #10
Source File: Light.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced)
{
    int range = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightBlockRange;
    int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightEnergyBaseUsage;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.LIGHT_DESC));
        tooltip.add(Lang.getLightRange(range));
        tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
   
}
 
Example #11
Source File: ItemKotachi.java    From Sakura_mod with MIT License 5 votes vote down vote up
public ItemKotachi(Item.ToolMaterial material, String name) {
    this.material = material;
    this.maxStackSize = 1;
    this.setMaxDamage((int) (material.getMaxUses()*0.75f));
    this.setUnlocalizedName(SakuraMain.MODID + "." + name);
    this.attackDamage = material.getAttackDamage();
    this.addPropertyOverride(new ResourceLocation("blocking"), new IItemPropertyGetter() {
        @SideOnly(Side.CLIENT)
        public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
            return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F;
        }
    });
}
 
Example #12
Source File: YouCouldMakeAReligionOutOfThis.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onClientTick(TickEvent.ClientTickEvent event) {
    if (event.phase == TickEvent.Phase.START) {
        Minecraft client = Minecraft.getMinecraft();
        if (client.world != null && !client.isGamePaused()) {
            RANDOM.setSeed((client.world.getTotalWorldTime() * M) ^ client.world.getSeed());
            if (RANDOM.nextInt(CHANCE) == 0) {
                ISound sound = PositionedSoundRecord.getMasterRecord(YOU_COULD_MAKE_A_RELIGION_OUT_OF_THIS, 1.0F);
                client.getSoundHandler().playSound(sound);
            }
        }
    }
}
 
Example #13
Source File: Cooker.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced)
{
    int loss = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerBaseHeatLoss;
    int gain = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerBaseHeatGain;
    int heat = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerRequiredCookingHeat;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.COOKER_DESC));
        tooltip.add(Lang.getHeatGainLoss(gain, loss));
    tooltip.add(Lang.getRequired(heat, ResourceTypeEnum.HEAT));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #14
Source File: GreenBulb.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced)
{
    int lightBaseEnergy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightEnergyBaseUsage;
    int growth = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.growthGreenBulbModifier;
    int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.energyGreenBulbModifier * lightBaseEnergy;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.BULB_DESC));
        tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY));
        tooltip.add(Lang.getGenerated(growth, ResourceTypeEnum.GROWTH));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #15
Source File: ItemTofuShield.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public ItemTofuShield(int damage) {
    super();
    this.setMaxStackSize(1);
    this.setMaxDamage(damage);
    this.addPropertyOverride(new ResourceLocation("blocking"), new IItemPropertyGetter() {
        @SideOnly(Side.CLIENT)
        public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
            return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F;
        }
    });
    BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(this, ItemArmor.DISPENSER_BEHAVIOR);
}
 
Example #16
Source File: PurpleBulb.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced)
{
    int lightBaseEnergy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightEnergyBaseUsage;
    int growth = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.growthPurpleBulbModifier;
    int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.energyPurpleBulbModifier * lightBaseEnergy;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.BULB_DESC));
        tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY));
        tooltip.add(Lang.getGenerated(growth, ResourceTypeEnum.GROWTH));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #17
Source File: TileEntityRegistry.java    From Sakura_mod with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void render() {
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCampfire.class, new RenderTileEntityCampfire());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStoneMortar.class, new RenderTileEntityStoneMortar());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCampfirePot.class, new RenderTileEntityCampfirePot());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMapleCauldron.class, new RenderTileEntityMapleCauldron());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShoji.class, new ShojiRender());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOben.class, new RenderTileEntityOben());
    getItem(BlockLoader.STONEMORTAR).setTileEntityItemStackRenderer(new TileEntityRenderHelper());
}
 
Example #18
Source File: ItemKatana.java    From Sakura_mod with MIT License 5 votes vote down vote up
public ItemKatana(Item.ToolMaterial material, String name) {
    this.material = material;
    this.maxStackSize = 1;
    this.setMaxDamage(material.getMaxUses());
    this.setUnlocalizedName(SakuraMain.MODID + "." + name);
    this.attackDamage = 3.0F + material.getAttackDamage();
    this.addPropertyOverride(new ResourceLocation("blocking"), new IItemPropertyGetter() {
        @SideOnly(Side.CLIENT)
        public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
            return entityIn != null && entityIn.isHandActive() && entityIn.getActiveItemStack() == stack ? 1.0F : 0.0F;
        }
    });
}
 
Example #19
Source File: BlockTraverseLeaves.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
    if (!Minecraft.getMinecraft().gameSettings.fancyGraphics) {
        if (!(blockAccess.getBlockState(pos.offset(side)).getBlock() instanceof BlockLeaves)) {
            return true;
        }
        return false;
    }
    return true;
}
 
Example #20
Source File: TileEntitySaltFurnace.java    From TofuCraftReload with MIT License 5 votes vote down vote up
/**
 * Returns remaining burn time in integer between 0 and par1
 */
@SideOnly(Side.CLIENT)
public int getBurnTimeRemainingScaled(int par1) {
    if (this.currentItemBurnTime == 0) {
        this.currentItemBurnTime = 200;
    }

    return this.furnaceBurnTime * par1 / this.currentItemBurnTime;
}
 
Example #21
Source File: ItemTofuCore.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public ItemTofuCore() {
    super();
    this.setMaxStackSize(1);
    this.setMaxDamage(300);
    this.setUnlocalizedName(TofuMain.MODID + "." + "tofucore");
    this.addPropertyOverride(new ResourceLocation("broken"), new IItemPropertyGetter() {
        @SideOnly(Side.CLIENT)
        public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
            return isUsable(stack) ? 0.0F : 1.0F;
        }
    });
}
 
Example #22
Source File: ItemTofuCore.java    From TofuCraftReload with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    //tooltip.add(I18n.translateToLocal("tooltip.tofucraft.tofuforce_core2"));
    if (!isUsable(stack)) {
        tooltip.add(TextFormatting.ITALIC + I18n.format("tooltip.tofucraft.tofuforce_core.broken"));
    }
    super.addInformation(stack, worldIn, tooltip, flagIn);
}
 
Example #23
Source File: SolarGlass.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {

    int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.SOLARGLASS.solarEnergyGenerated;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.SOLARGLASS_DESC));
        tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #24
Source File: ItemTofuForceCore.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public ItemTofuForceCore() {
    super();
    this.setMaxStackSize(1);
    this.setMaxDamage(360);
    this.setUnlocalizedName(TofuMain.MODID + "." + "tofuforce_core");
    this.addPropertyOverride(new ResourceLocation("broken"), new IItemPropertyGetter() {
        @SideOnly(Side.CLIENT)
        public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
            return isUsable(stack) ? 0.0F : 1.0F;
        }
    });
}
 
Example #25
Source File: RegistrationHandler.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void registerModels(ModelRegistryEvent event) {

    for (Block block : ModBlocks.getBlocks()) {
        registerModel(Item.getItemFromBlock(block));
    }

    for (Item item : ModItems.getItems()) {
        registerModel(item);
    }

    registerModTissueModels();

    // Hydroponic TESR
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(ModBlocks.hydroponic), 0,
            new ModelResourceLocation(ModBlocks.hydroponic.getRegistryName(), "inventory"));

    ClientRegistry.bindTileEntitySpecialRenderer(HydroponicTileEntity.class, new HydroponicTESR());

    ClientRegistry.bindTileEntitySpecialRenderer(TidalGeneratorTileEntity.class,
            new AnimationTESR<TidalGeneratorTileEntity>());

    ClientRegistry.bindTileEntitySpecialRenderer(WindTileEntity.class, new AnimationTESR<WindTileEntity>());
    ClientRegistry.bindTileEntitySpecialRenderer(ScrubberTileEntity.class, new AnimationTESR<ScrubberTileEntity>());
    ClientRegistry.bindTileEntitySpecialRenderer(HarvesterTileEntity.class, new AnimationTESR<HarvesterTileEntity>());

    RenderHandler.registerMeshesAndStatesForBlock(ModBlocks.carbondioxideblock);
    RenderHandler.registerMeshesAndStatesForBlock(ModBlocks.nutrientblock);
}
 
Example #26
Source File: ElementBase.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void draw(GuiRoutiduct gui) {
    if (sprite != null) {
        GlStateManager.color(1F, 1F, 1F);
        Routiduct.proxy.getGuiAssembler().setTextureSheet(sprite.textureLocation);
        gui.drawTexturedModalRect(x + gui.getOffsetFactorX(), y + gui.getOffsetFactorY(), sprite.x, sprite.y, sprite.width, sprite.height);
    }
}
 
Example #27
Source File: NozzleBase.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.NOZZLE_DESC));
        tooltip.add(getSpecialDescription());
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #28
Source File: Shredder.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {
    int energy = EmergingTechnologyConfig.POLYMERS_MODULE.SHREDDER.shredderEnergyBaseUsage;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.SHREDDER_DESC));
        tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #29
Source File: Diffuser.java    From EmergingTechnology with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {
    int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserEnergyBaseUsage;
    int gas = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserGasBaseUsage;
    int range = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserBaseRange;

    if (KeyBindings.showExtendedTooltips()) {
        tooltip.add(Lang.get(Lang.DIFFUSER_DESC));
        tooltip.add(Lang.getGasRange(range));
        tooltip.add(Lang.getRequired(gas, ResourceTypeEnum.GAS));
        tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY));
    } else {
        tooltip.add(Lang.get(Lang.INTERACT_SHIFT));
    }
}
 
Example #30
Source File: BlockShoji.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}