ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/ItemLens.java

29 lines
708 B
Java
Raw Normal View History

2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.items.lens;
2015-11-22 18:52:11 +01:00
2016-01-05 04:47:35 +01:00
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
2015-11-22 18:52:11 +01:00
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
2019-05-02 09:10:29 +02:00
public class ItemLens extends ItemBase implements ILensItem {
2015-11-22 18:52:11 +01:00
2016-05-19 20:05:12 +02:00
private final Lens type;
2015-11-22 18:52:11 +01:00
2019-05-02 09:10:29 +02:00
public ItemLens(String name, Lens type) {
super(name);
2015-11-22 18:52:11 +01:00
this.type = type;
this.setMaxStackSize(1);
}
@Override
2019-05-02 09:10:29 +02:00
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.UNCOMMON;
2015-11-22 18:52:11 +01:00
}
2016-01-05 04:47:35 +01:00
@Override
2019-05-02 09:10:29 +02:00
public Lens getLens() {
2015-11-22 18:52:11 +01:00
return this.type;
}
}