mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +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
83 lines
1.8 KiB
Java
83 lines
1.8 KiB
Java
package binnie.extratrees.item;
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraftforge.fluids.FluidStack;
|
|
|
|
import binnie.Binnie;
|
|
import binnie.core.liquid.FluidContainer;
|
|
import binnie.core.liquid.ILiquidType;
|
|
import binnie.core.util.I18N;
|
|
import binnie.extratrees.ExtraTrees;
|
|
|
|
public enum ExtraTreeLiquid implements ILiquidType {
|
|
|
|
Sap("sap", 0xbe7542),
|
|
Resin("resin", 0xc96800),
|
|
Latex("latex", 0xd8dbc9),
|
|
Turpentine("turpentine", 0x79533a);
|
|
|
|
public final String name;
|
|
|
|
private final String ident;
|
|
private IIcon icon;
|
|
private final int color;
|
|
|
|
ExtraTreeLiquid(String name, int color) {
|
|
this.name = name;
|
|
this.ident = name;
|
|
this.color = color;
|
|
}
|
|
|
|
@Override
|
|
public IIcon getIcon() {
|
|
return icon;
|
|
}
|
|
|
|
@Override
|
|
public void registerIcon(IIconRegister register) {
|
|
icon = ExtraTrees.proxy.getIcon(register, "liquids/" + getIdentifier());
|
|
}
|
|
|
|
@Override
|
|
public String getName() {
|
|
return I18N.localise("extratrees.fluid." + name);
|
|
}
|
|
|
|
@Override
|
|
public String getIdentifier() {
|
|
return ident;
|
|
}
|
|
|
|
@Override
|
|
public int getColor() {
|
|
return 0xffffff;
|
|
}
|
|
|
|
@Override
|
|
public FluidStack get(int amount) {
|
|
return Binnie.Liquid.getLiquidStack(ident, amount);
|
|
}
|
|
|
|
@Override
|
|
public int getTransparency() {
|
|
return 255;
|
|
}
|
|
|
|
@Override
|
|
public boolean canPlaceIn(FluidContainer container) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean showInCreative(FluidContainer container) {
|
|
return container == FluidContainer.Bucket || container == FluidContainer.Can
|
|
|| container == FluidContainer.Capsule;
|
|
}
|
|
|
|
@Override
|
|
public int getContainerColor() {
|
|
return color;
|
|
}
|
|
}
|