aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/elisis/gtnhlanth/common/item/PhotolithographicMask.java
blob: a6b34660f02be4f87c9f33134979e55df8279f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.elisis.gtnhlanth.common.item;

import java.util.List;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import com.elisis.gtnhlanth.Tags;

public class PhotolithographicMask extends Item implements ICanFocus {

    private String name;
    private String descSpectrum;

    public PhotolithographicMask(String name, int maxDamage, String descSpectrum) {
        super();
        this.name = name;
        this.descSpectrum = descSpectrum;
        this.setUnlocalizedName("photomask." + name);
        this.setMaxStackSize(1);
        this.setMaxDamage(maxDamage);
        this.setTextureName(Tags.MODID + ":photomask/" + name);
    }

    /*
     * @Override public String getUnlocalizedName() { return "item.photomask." + this.name; }
     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Override
    public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {

        if (!this.descSpectrum.isEmpty())
            list.add("Suitable for the " + this.descSpectrum + " segment of the electromagnetic spectrum and lower");

    }

}