blob: 30cbac875baceba70fea4061c0318228db333f8e (
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
39
40
41
42
|
package gtnhlanth.common.item;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import gtnhlanth.Tags;
public class ItemPhotolithographicMask extends Item implements ICanFocus {
private final String name;
private final String descSpectrum;
public ItemPhotolithographicMask(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");
}
public String getDescSpectrum() {
return descSpectrum;
}
}
|