mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +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
44 lines
1.0 KiB
Java
44 lines
1.0 KiB
Java
package binnie.extratrees.genetics;
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.util.IIcon;
|
|
|
|
import binnie.Binnie;
|
|
import binnie.core.resource.BinnieIcon;
|
|
import binnie.extratrees.ExtraTrees;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import forestry.api.core.IIconProvider;
|
|
|
|
public enum FruitSprite implements IIconProvider {
|
|
|
|
Tiny,
|
|
Small,
|
|
Average,
|
|
Large,
|
|
Larger,
|
|
Pear;
|
|
|
|
private BinnieIcon icon;
|
|
|
|
public short getIndex() {
|
|
return (short) (ordinal() + 4200);
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public IIcon getIcon(short texUID) {
|
|
int index = texUID - 4200;
|
|
if (index >= 0 && index < values().length) {
|
|
return values()[index].icon.getIcon();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public void registerIcons(IIconRegister register) {
|
|
icon = Binnie.Resource.getBlockIcon(ExtraTrees.instance, "fruit/" + toString().toLowerCase());
|
|
}
|
|
}
|