mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +00:00
* Finalize, minor alloc reduction Also enable Jabel and generic injection * Update dependencies.gradle * Clean up Machine a bit * spotless more enhanced instanceof * Update ModuleMachine.java * More clen * WARN: Removed exception catching * Many, many tiny patches + birthday fix * Spotless * Spotless again * Fix getLow and clamp tolerance value * Revert event -> ignored on unused event parameters * Rename instanceof variables * Update Machine.java * Use StringBuilder * Cache getStack() * Oops, Jabel can't handle that * Spotless * Spotless again My IDE was fighting with it * Remove unused elements + scream test success
70 lines
1.6 KiB
Java
70 lines
1.6 KiB
Java
package binnie.genetics.item;
|
|
|
|
import java.util.List;
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.IIcon;
|
|
|
|
import binnie.core.item.IItemMisc;
|
|
import binnie.core.util.I18N;
|
|
import binnie.genetics.Genetics;
|
|
|
|
public enum GeneticsItems implements IItemMisc {
|
|
|
|
LaboratoryCasing("casingIron"),
|
|
DNADye("dnaDye"),
|
|
FluorescentDye("dyeFluor"),
|
|
Enzyme("enzyme"),
|
|
GrowthMedium("growthMedium"),
|
|
EmptySequencer("sequencerEmpty"),
|
|
EmptySerum("serumEmpty"),
|
|
EmptyGenome("genomeEmpty"),
|
|
Cylinder("cylinderEmpty"),
|
|
IntegratedCircuit("integratedCircuit"),
|
|
IntegratedCPU("integratedCPU"),
|
|
IntegratedCasing("casingCircuit");
|
|
|
|
private IIcon icon;
|
|
private final String name;
|
|
private final String iconPath;
|
|
|
|
GeneticsItems(String name) {
|
|
this.name = name;
|
|
this.iconPath = name;
|
|
}
|
|
|
|
@Override
|
|
public IIcon getIcon(ItemStack itemStack) {
|
|
return icon;
|
|
}
|
|
|
|
@Override
|
|
public void registerIcons(IIconRegister register) {
|
|
icon = Genetics.proxy.getIcon(register, iconPath);
|
|
}
|
|
|
|
@Override
|
|
public void addInformation(List<String> data) {
|
|
// ignored
|
|
}
|
|
|
|
@Override
|
|
public String getName(ItemStack itemStack) {
|
|
return I18N.localise("genetics.item." + name + ".name");
|
|
}
|
|
|
|
@Override
|
|
public ItemStack get(int count) {
|
|
if (Genetics.itemGenetics == null) {
|
|
return null;
|
|
}
|
|
return new ItemStack(Genetics.itemGenetics, count, ordinal());
|
|
}
|
|
|
|
@Override
|
|
public boolean isActive() {
|
|
return true;
|
|
}
|
|
}
|