mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 03:49:07 +00:00
Feature/refactoring (#207)
* Fixed deprecated I18n usage * Code improve readability for botany.api package * Fix naming of templateAsGenome method params
This commit is contained in:
1 parent
96fe27e834
commit
0aa9853da2
59 files changed
+236
-261
No files matched your search
@@ -1,10 +1,10 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum EnumAcidity implements IStringSerializable {
|
||||
ACID(TextFormatting.RED),
|
||||
@@ -24,9 +24,9 @@ public enum EnumAcidity implements IStringSerializable {
|
||||
}
|
||||
|
||||
public String getLocalisedName(boolean withColor) {
|
||||
String localisedName = I18n.translateToLocal("botany.ph." + getName());
|
||||
if(withColor && color != null){
|
||||
localisedName +=color;
|
||||
String localisedName = I18N.localise("botany.ph." + getName());
|
||||
if (withColor && color != null) {
|
||||
localisedName += color;
|
||||
}
|
||||
return localisedName;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleArea;
|
||||
@@ -11,6 +9,8 @@ import forestry.api.genetics.IAlleleTolerance;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum EnumFlowerChromosome implements IChromosomeType {
|
||||
SPECIES(IAlleleFlowerSpecies.class),
|
||||
PRIMARY(IAlleleInteger.class),
|
||||
@@ -27,7 +27,7 @@ public enum EnumFlowerChromosome implements IChromosomeType {
|
||||
|
||||
private Class<? extends IAllele> cls;
|
||||
|
||||
EnumFlowerChromosome(final Class<? extends IAllele> cls) {
|
||||
EnumFlowerChromosome(Class<? extends IAllele> cls) {
|
||||
this.cls = cls;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public enum EnumFlowerStage implements ISpeciesType {
|
||||
public static final EnumFlowerStage[] VALUES = values();
|
||||
String name;
|
||||
|
||||
EnumFlowerStage(final String name) {
|
||||
EnumFlowerStage(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum EnumMoisture implements IStringSerializable {
|
||||
DRY(TextFormatting.YELLOW),
|
||||
@@ -24,9 +24,9 @@ public enum EnumMoisture implements IStringSerializable {
|
||||
}
|
||||
|
||||
public String getLocalisedName(boolean withColor) {
|
||||
String localisedName = I18n.translateToLocal("botany.moisture." + getName());
|
||||
if(withColor && color != null){
|
||||
localisedName +=color;
|
||||
String localisedName = I18N.localise("botany.moisture." + getName());
|
||||
if (withColor && color != null) {
|
||||
localisedName += color;
|
||||
}
|
||||
return localisedName;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Locale;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum EnumSoilType implements IStringSerializable {
|
||||
SOIL(TextFormatting.DARK_GRAY),
|
||||
LOAM(TextFormatting.GOLD),
|
||||
FLOWERBED(TextFormatting.LIGHT_PURPLE);
|
||||
|
||||
@Nullable
|
||||
final TextFormatting color;
|
||||
private final TextFormatting color;
|
||||
|
||||
EnumSoilType(@Nullable TextFormatting color) {
|
||||
EnumSoilType(TextFormatting color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@@ -24,7 +22,7 @@ public enum EnumSoilType implements IStringSerializable {
|
||||
return this.name().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public String getTranslated(boolean withColor) {
|
||||
return (withColor && color != null ? color : "") + I18n.translateToLocal("botany.soil." + getName());
|
||||
public String getTranslated() {
|
||||
return color + I18N.localise("botany.soil." + getName());
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public class FlowerManager {
|
||||
* Used to create new flowers.
|
||||
*/
|
||||
public static IFlowerFactory flowerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* Used to manager soil.
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IAlleleFlowerEffect extends IAlleleEffect {
|
||||
IEffectData doEffect(final IFlowerGenome p0, final IEffectData p1, final World p2, final int p3, final int p4, final int p5);
|
||||
IEffectData doEffect(IFlowerGenome genome, IEffectData effect, World world, int x, int y, int z);
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.genetics.IAlleleProperty;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IAlleleFlowerSpecies extends IAlleleSpecies, IAlleleProperty<IAlleleFlowerSpecies> {
|
||||
IFlowerType getType();
|
||||
@@ -18,7 +16,7 @@ public interface IAlleleFlowerSpecies extends IAlleleSpecies, IAlleleProperty<IA
|
||||
EnumMoisture getMoisture();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
int getFlowerColour(EnumFlowerStage type, int renderPass);
|
||||
int getFlowerColor(EnumFlowerStage type, int renderPass);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation getFlowerModel(EnumFlowerStage type, boolean flowered);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
public interface IColorMix {
|
||||
IFlowerColour getColorFirst();
|
||||
|
||||
IFlowerColour getColorSecond();
|
||||
|
||||
boolean isMutation(IFlowerColour colorFirst, IFlowerColour colorSecond);
|
||||
|
||||
int getChance();
|
||||
|
||||
IFlowerColour getResult();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
public interface IColourMix {
|
||||
IFlowerColour getColourFirst();
|
||||
|
||||
IFlowerColour getColourSecond();
|
||||
|
||||
boolean isMutation(IFlowerColour colourFirst, IFlowerColour colourSecond);
|
||||
|
||||
int getChance();
|
||||
|
||||
IFlowerColour getResult();
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IFlower extends IIndividual {
|
||||
@Override
|
||||
@@ -14,25 +13,25 @@ public interface IFlower extends IIndividual {
|
||||
@Nullable
|
||||
IFlowerGenome getMate();
|
||||
|
||||
void mate(final IFlower flower);
|
||||
void mate(IFlower flower);
|
||||
|
||||
int getAge();
|
||||
|
||||
void setAge(final int age);
|
||||
void setAge(int age);
|
||||
|
||||
void age();
|
||||
|
||||
IFlower getOffspring(final World world, final BlockPos pos);
|
||||
IFlower getOffspring(World world, BlockPos pos);
|
||||
|
||||
int getMaxAge();
|
||||
|
||||
boolean isWilted();
|
||||
|
||||
void setWilted(final boolean p0);
|
||||
void setWilted(boolean p0);
|
||||
|
||||
boolean hasFlowered();
|
||||
|
||||
void setFlowered(final boolean p0);
|
||||
void setFlowered(boolean p0);
|
||||
|
||||
void removeMate();
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package binnie.botany.api;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
|
||||
public interface IFlowerColour {
|
||||
int getColor(final boolean p0);
|
||||
int getColor(boolean dis);
|
||||
|
||||
IAlleleInteger getAllele();
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.core.genetics.IGeneticDefinition;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IFlowerDefinition extends IGeneticDefinition {
|
||||
@Override
|
||||
|
||||
@@ -6,5 +6,5 @@ import forestry.api.genetics.IClassification;
|
||||
public interface IFlowerFactory {
|
||||
IAlleleFlowerSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean isDominant, IClassification branch, String binomial, IFlowerType flowerType);
|
||||
|
||||
IFlowerMutationBuilder createMutation(IAlleleFlowerSpecies parentFlower0, IAlleleFlowerSpecies parentFlower1, IAllele[] result, int chance);
|
||||
IFlowerMutationBuilder createMutation(IAlleleFlowerSpecies allele0, IAlleleFlowerSpecies allele1, IAllele[] result, int chance);
|
||||
}
|
||||
@@ -33,9 +33,9 @@ public interface IFlowerGenome extends IGenome {
|
||||
|
||||
float getSappiness();
|
||||
|
||||
boolean canTolerate(final EnumAcidity p0);
|
||||
boolean canTolerate(EnumAcidity acidity);
|
||||
|
||||
boolean canTolerate(final EnumMoisture p0);
|
||||
boolean canTolerate(EnumMoisture moisture);
|
||||
|
||||
boolean canTolerate(final EnumTemperature p0);
|
||||
boolean canTolerate(EnumTemperature temperature);
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import forestry.api.genetics.IMutation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IMutation;
|
||||
|
||||
public interface IFlowerMutation extends IMutation {
|
||||
@Override
|
||||
IFlowerRoot getRoot();
|
||||
|
||||
float getChance(final World world, final BlockPos pos, final IAlleleFlowerSpecies p0, final IAlleleFlowerSpecies p1, final IFlowerGenome p2, final IFlowerGenome p3);
|
||||
float getChance(World world, BlockPos pos, IAlleleFlowerSpecies allele0, IAlleleFlowerSpecies allele1, IFlowerGenome genome0, IFlowerGenome genome1);
|
||||
}
|
||||
@@ -1,17 +1,15 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface IFlowerRoot extends ISpeciesRoot {
|
||||
@Override
|
||||
@@ -28,7 +26,7 @@ public interface IFlowerRoot extends ISpeciesRoot {
|
||||
IFlowerGenome templateAsGenome(IAllele[] template);
|
||||
|
||||
@Override
|
||||
IFlowerGenome templateAsGenome(IAllele[] templateFrist, IAllele[] templateSecond);
|
||||
IFlowerGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
@Override
|
||||
IBotanistTracker getBreedingTracker(World world, @Nullable GameProfile profile);
|
||||
@@ -47,13 +45,13 @@ public interface IFlowerRoot extends ISpeciesRoot {
|
||||
@Nullable
|
||||
IFlower getConversion(ItemStack memberStack);
|
||||
|
||||
Collection<IColourMix> getColourMixes(boolean p0);
|
||||
Collection<IColorMix> getColorMixes(boolean shuffle);
|
||||
|
||||
void registerColourMix(IColorMix colorMix);
|
||||
|
||||
void registerColourMix(IColourMix colourMix);
|
||||
|
||||
boolean plant(World world, BlockPos pos, IFlower flower, GameProfile owner);
|
||||
|
||||
|
||||
void tryGrowSection(World world, BlockPos pos);
|
||||
|
||||
|
||||
void onGrowFromSeed(World world, BlockPos pos);
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
|
||||
public interface IFlowerType<I extends IFlowerType<I>> extends Comparable<I> {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager, EnumFlowerStage type);
|
||||
|
||||
@@ -1,68 +1,67 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IGardeningManager {
|
||||
default boolean isSoil(final Block block) {
|
||||
default boolean isSoil(Block block) {
|
||||
return block instanceof IBlockSoil;
|
||||
}
|
||||
|
||||
|
||||
boolean isSoil(Item item);
|
||||
|
||||
|
||||
boolean isSoil(ItemStack item);
|
||||
|
||||
|
||||
EnumMoisture getNaturalMoisture(World world, BlockPos pos);
|
||||
|
||||
|
||||
EnumAcidity getNaturalPH(World world, BlockPos pos);
|
||||
|
||||
|
||||
float getBiomeMoisture(World world, BlockPos pos);
|
||||
|
||||
|
||||
float getBiomePH(World world, BlockPos pos);
|
||||
|
||||
|
||||
void plantSoil(World world, BlockPos pos, EnumSoilType soil, EnumMoisture moisture, EnumAcidity acidity);
|
||||
|
||||
|
||||
Collection<ItemStack> getAcidFertilisers();
|
||||
|
||||
|
||||
Collection<ItemStack> getAlkalineFertilisers();
|
||||
|
||||
|
||||
Collection<ItemStack> getNutrientFertilisers();
|
||||
|
||||
|
||||
void registerAcidFertiliser(ItemStack stack, int strength);
|
||||
|
||||
|
||||
void registerAlkalineFertiliser(ItemStack stack, int strength);
|
||||
|
||||
|
||||
void registerNutrientFertiliser(ItemStack stack, int strength);
|
||||
|
||||
|
||||
boolean isAcidFertiliser(ItemStack stack);
|
||||
|
||||
|
||||
boolean isAlkalineFertiliser(ItemStack stack);
|
||||
|
||||
|
||||
boolean isNutrientFertiliser(ItemStack stack);
|
||||
|
||||
|
||||
int getFertiliserStrength(ItemStack stack);
|
||||
|
||||
|
||||
boolean canTolerate(@Nullable IFlower flower, World world, BlockPos pos);
|
||||
|
||||
|
||||
EnumSoilType getSoilType(World world, BlockPos pos);
|
||||
|
||||
|
||||
default Block getSoilBlock(EnumSoilType type) {
|
||||
return getSoilBlock(type, false);
|
||||
}
|
||||
|
||||
Block getSoilBlock(EnumSoilType type, boolean weedkill);
|
||||
|
||||
boolean canTolerate(IFlower flower, EnumAcidity ePH, EnumMoisture eMoisture, EnumTemperature eTemp);
|
||||
|
||||
|
||||
Block getSoilBlock(EnumSoilType type, boolean weedKill);
|
||||
|
||||
boolean canTolerate(IFlower flower, EnumAcidity acidity, EnumMoisture moisture, EnumTemperature temperature);
|
||||
|
||||
boolean isWeedkiller(ItemStack heldItem);
|
||||
|
||||
|
||||
boolean addWeedKiller(World world, BlockPos pos);
|
||||
}
|
||||
@@ -2,6 +2,6 @@
|
||||
@MethodsReturnNonnullByDefault
|
||||
package binnie.botany.api;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -88,7 +88,7 @@ public class BlockStainedGlass extends Block implements IBlockMetadata, IColored
|
||||
player.addExhaustion(0.005F);
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0 && te instanceof TileEntityMetadata) {
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<>();
|
||||
TileEntityMetadata tile = (TileEntityMetadata) te;
|
||||
int damage = getDroppedMeta(state, tile.getTileMetadata());
|
||||
ItemStack itemstack = TileEntityMetadata.getItemStack(this, damage);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package binnie.botany.craftgui;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.controls.listbox.ControlListBox;
|
||||
|
||||
public class ControlColorMixBox extends ControlListBox<IColourMix> {
|
||||
public class ControlColorMixBox extends ControlListBox<IColorMix> {
|
||||
private int index;
|
||||
private Type type;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ControlColorMixBox extends ControlListBox<IColourMix> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IWidget createOption(final IColourMix value, final int y) {
|
||||
public IWidget createOption(final IColorMix value, final int y) {
|
||||
return new ControlColorMixItem(this.getContent(), value, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package binnie.botany.craftgui;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.core.craftgui.controls.listbox.ControlList;
|
||||
import binnie.core.craftgui.controls.listbox.ControlOption;
|
||||
|
||||
public class ControlColorMixItem extends ControlOption<IColourMix> {
|
||||
public class ControlColorMixItem extends ControlOption<IColorMix> {
|
||||
private final ControlColorDisplay itemWidget1;
|
||||
private final ControlColorDisplay itemWidget2;
|
||||
private final ControlColorDisplay itemWidget3;
|
||||
private final ControlColorMixSymbol addSymbol;
|
||||
private final ControlColorMixSymbol arrowSymbol;
|
||||
|
||||
public ControlColorMixItem(final ControlList<IColourMix> controlList, final IColourMix option, final int y) {
|
||||
public ControlColorMixItem(final ControlList<IColorMix> controlList, final IColorMix option, final int y) {
|
||||
super(controlList, option, y);
|
||||
IColourMix value = this.getValue();
|
||||
this.itemWidget1 = new ControlColorDisplay(this, 4, 4, value.getColourFirst());
|
||||
this.itemWidget2 = new ControlColorDisplay(this, 44, 4, value.getColourSecond());
|
||||
IColorMix value = this.getValue();
|
||||
this.itemWidget1 = new ControlColorDisplay(this, 4, 4, value.getColorFirst());
|
||||
this.itemWidget2 = new ControlColorDisplay(this, 44, 4, value.getColorSecond());
|
||||
this.itemWidget3 = new ControlColorDisplay(this, 104, 4, value.getResult());
|
||||
this.addSymbol = new ControlColorMixSymbol(this, 24, 4, 0, value);
|
||||
this.arrowSymbol = new ControlColorMixSymbol(this, 64, 4, 1, value);
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.botany.craftgui;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.core.craftgui.Attribute;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.ITooltip;
|
||||
@@ -19,10 +19,10 @@ import binnie.core.util.I18N;
|
||||
public class ControlColorMixSymbol extends Control implements ITooltip {
|
||||
static Texture MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
|
||||
static Texture MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
|
||||
IColourMix value;
|
||||
IColorMix value;
|
||||
int type;
|
||||
|
||||
protected ControlColorMixSymbol(final IWidget parent, final int x, final int y, final int type, final IColourMix value) {
|
||||
protected ControlColorMixSymbol(final IWidget parent, final int x, final int y, final int type, final IColorMix value) {
|
||||
super(parent, x, y, 16 + type * 16, 16);
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
@@ -40,7 +40,7 @@ public class ControlColorMixSymbol extends Control implements ITooltip {
|
||||
}
|
||||
}
|
||||
|
||||
public void setValue(final IColourMix value) {
|
||||
public void setValue(final IColorMix value) {
|
||||
this.value = value;
|
||||
this.setColour(0xffffff);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.botany.craftgui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.botany.api.IFlowerColour;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
@@ -25,9 +25,9 @@ public class PageColorMix extends PageAbstract<IFlowerColour> {
|
||||
|
||||
@Override
|
||||
public void onValueChanged(final IFlowerColour colour) {
|
||||
final List<IColourMix> mixes = new ArrayList<>();
|
||||
for (final IColourMix mix : BotanyCore.getFlowerRoot().getColourMixes(false)) {
|
||||
if (mix.getColourFirst() == colour || mix.getColourSecond() == colour) {
|
||||
final List<IColorMix> mixes = new ArrayList<>();
|
||||
for (final IColorMix mix : BotanyCore.getFlowerRoot().getColorMixes(false)) {
|
||||
if (mix.getColorFirst() == colour || mix.getColorSecond() == colour) {
|
||||
mixes.add(mix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.botany.craftgui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.botany.api.IFlowerColour;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
@@ -25,8 +25,8 @@ public class PageColorMixResultant extends PageAbstract<IFlowerColour> {
|
||||
|
||||
@Override
|
||||
public void onValueChanged(final IFlowerColour colour) {
|
||||
final List<IColourMix> mixes = new ArrayList<>();
|
||||
for (final IColourMix mix : BotanyCore.getFlowerRoot().getColourMixes(false)) {
|
||||
final List<IColorMix> mixes = new ArrayList<>();
|
||||
for (final IColorMix mix : BotanyCore.getFlowerRoot().getColorMixes(false)) {
|
||||
if (mix.getResult() == colour) {
|
||||
mixes.add(mix);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
package binnie.botany.gardening;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumMoisture;
|
||||
import binnie.botany.api.EnumSoilType;
|
||||
import binnie.botany.api.IBlockSoil;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IGardeningManager;
|
||||
import binnie.botany.items.BotanyItems;
|
||||
import forestry.api.climate.IClimateInfo;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -16,18 +21,11 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import forestry.api.climate.IClimateInfo;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumMoisture;
|
||||
import binnie.botany.api.EnumSoilType;
|
||||
import binnie.botany.api.IBlockSoil;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IGardeningManager;
|
||||
import binnie.botany.items.BotanyItems;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Gardening implements IGardeningManager {
|
||||
private final Map<ItemStack, Integer> fertiliserAcid = new LinkedHashMap<>();
|
||||
@@ -219,23 +217,25 @@ public class Gardening implements IGardeningManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getSoilBlock(final EnumSoilType type, final boolean weedkill) {
|
||||
public Block getSoilBlock(final EnumSoilType type, final boolean weedKill) {
|
||||
switch (type) {
|
||||
case FLOWERBED: {
|
||||
return weedkill ? Botany.flowerbedNoWeed : Botany.flowerbed;
|
||||
return weedKill ? Botany.flowerbedNoWeed : Botany.flowerbed;
|
||||
}
|
||||
case LOAM: {
|
||||
return weedkill ? Botany.loamNoWeed : Botany.loam;
|
||||
return weedKill ? Botany.loamNoWeed : Botany.loam;
|
||||
}
|
||||
default: {
|
||||
return weedkill ? Botany.soilNoWeed : Botany.soil;
|
||||
return weedKill ? Botany.soilNoWeed : Botany.soil;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTolerate(IFlower flower, EnumAcidity ePH, EnumMoisture eMoisture, EnumTemperature eTemp) {
|
||||
return flower.getGenome().canTolerate(ePH) && flower.getGenome().canTolerate(eMoisture) && flower.getGenome().canTolerate(eTemp);
|
||||
public boolean canTolerate(IFlower flower, EnumAcidity acidity, EnumMoisture moisture, EnumTemperature temperature) {
|
||||
return flower.getGenome().canTolerate(acidity)
|
||||
&& flower.getGenome().canTolerate(moisture)
|
||||
&& flower.getGenome().canTolerate(temperature);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ItemSoilMeter extends Item implements IItemModelRegister {
|
||||
if (gardening.isSoil(block) && !BinnieCore.getBinnieProxy().isSimulating(worldIn)) {
|
||||
IBlockSoil soil = (IBlockSoil) block;
|
||||
String info = I18N.localise("botany.soil.type") + ": ";
|
||||
info = info + soil.getType(worldIn, pos).getTranslated(true);
|
||||
info = info + soil.getType(worldIn, pos).getTranslated();
|
||||
info += ", " + TextFormatting.WHITE + I18N.localise("botany.moisture") + ": ";
|
||||
info = info + soil.getMoisture(worldIn, pos).getLocalisedName(true);
|
||||
info += ", " + TextFormatting.WHITE + I18N.localise("botany.ph") + ": ";
|
||||
|
||||
@@ -34,8 +34,8 @@ public class AlleleEffectNone implements IAlleleFlowerEffect {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(final IFlowerGenome genome, final IEffectData storedData, final World world, final int x, final int y, final int z) {
|
||||
return storedData;
|
||||
public IEffectData doEffect(final IFlowerGenome genome, final IEffectData effect, final World world, final int x, final int y, final int z) {
|
||||
return effect;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,7 +83,7 @@ public class AlleleFlowerSpecies extends AlleleSpecies implements IAlleleFlowerS
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlowerColour(EnumFlowerStage type, int renderPass) {
|
||||
public int getFlowerColor(EnumFlowerStage type, int renderPass) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.botany.api.IFlowerColour;
|
||||
|
||||
public class ColourMix implements IColourMix {
|
||||
public class ColourMix implements IColorMix {
|
||||
IFlowerColour colour1;
|
||||
IFlowerColour colour2;
|
||||
IFlowerColour result;
|
||||
@@ -17,18 +17,18 @@ public class ColourMix implements IColourMix {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFlowerColour getColourFirst() {
|
||||
public IFlowerColour getColorFirst() {
|
||||
return this.colour1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFlowerColour getColourSecond() {
|
||||
public IFlowerColour getColorSecond() {
|
||||
return this.colour2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMutation(final IFlowerColour a, final IFlowerColour b) {
|
||||
return (a == this.colour1 && b == this.colour2) || (a == this.colour2 && b == this.colour1);
|
||||
public boolean isMutation(final IFlowerColour colorFirst, final IFlowerColour colorSecond) {
|
||||
return (colorFirst == this.colour1 && colorSecond == this.colour2) || (colorFirst == this.colour2 && colorSecond == this.colour1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ import forestry.core.genetics.Individual;
|
||||
|
||||
import binnie.botany.api.EnumFlowerChromosome;
|
||||
import binnie.botany.api.IAlleleFlowerSpecies;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IFlowerColour;
|
||||
import binnie.botany.api.IFlowerGenome;
|
||||
@@ -243,7 +243,7 @@ public class Flower extends Individual implements IFlower {
|
||||
IFlowerColour colourFirst = genome0.getPrimaryColor();
|
||||
IFlowerColour colourSecond = genome2.getPrimaryColor();
|
||||
if (colourFirst != colourSecond) {
|
||||
for (final IColourMix mutation : BotanyCore.getFlowerRoot().getColourMixes(true)) {
|
||||
for (final IColorMix mutation : BotanyCore.getFlowerRoot().getColorMixes(true)) {
|
||||
if (mutation.isMutation(colourFirst, colourSecond) && world.rand.nextFloat() * 100.0f < mutation.getChance()) {
|
||||
parentFirst[EnumFlowerChromosome.PRIMARY.ordinal()] = new Chromosome(mutation.getResult().getAllele());
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public class Flower extends Individual implements IFlower {
|
||||
colourFirst = genome0.getSecondaryColor();
|
||||
colourSecond = genome2.getSecondaryColor();
|
||||
if (colourFirst != colourSecond) {
|
||||
for (final IColourMix mutation : BotanyCore.getFlowerRoot().getColourMixes(true)) {
|
||||
for (final IColorMix mutation : BotanyCore.getFlowerRoot().getColorMixes(true)) {
|
||||
if (mutation.isMutation(colourFirst, colourSecond) && world.rand.nextFloat() * 100.0f < mutation.getChance()) {
|
||||
parentFirst[EnumFlowerChromosome.SECONDARY.ordinal()] = new Chromosome(mutation.getResult().getAllele());
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class Flower extends Individual implements IFlower {
|
||||
colourFirst = genome0.getStemColor();
|
||||
colourSecond = genome2.getStemColor();
|
||||
if (colourFirst != colourSecond) {
|
||||
for (final IColourMix mutation : BotanyCore.getFlowerRoot().getColourMixes(true)) {
|
||||
for (final IColorMix mutation : BotanyCore.getFlowerRoot().getColorMixes(true)) {
|
||||
if (mutation.isMutation(colourFirst, colourSecond) && world.rand.nextFloat() * 100.0f < mutation.getChance()) {
|
||||
parentFirst[EnumFlowerChromosome.STEM.ordinal()] = new Chromosome(mutation.getResult().getAllele());
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class FlowerColorAllele implements IFlowerColour, IAlleleInteger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(final boolean dis) {
|
||||
public int getColor(boolean dis) {
|
||||
return dis ? this.colorDis : this.color;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ public class FlowerFactory implements IFlowerFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFlowerMutationBuilder createMutation(IAlleleFlowerSpecies parentFlower0, IAlleleFlowerSpecies parentFlower1, IAllele[] result, int chance) {
|
||||
FlowerMutation mutation = new FlowerMutation(parentFlower0, parentFlower1, result, chance);
|
||||
public IFlowerMutationBuilder createMutation(IAlleleFlowerSpecies allele0, IAlleleFlowerSpecies allele1, IAllele[] result, int chance) {
|
||||
FlowerMutation mutation = new FlowerMutation(allele0, allele1, result, chance);
|
||||
FlowerManager.flowerRoot.registerMutation(mutation);
|
||||
return mutation;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IAlleleTolerance;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import forestry.core.genetics.Genome;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumFlowerChromosome;
|
||||
@@ -24,6 +9,19 @@ import binnie.botany.api.IAlleleFlowerSpecies;
|
||||
import binnie.botany.api.IFlowerGenome;
|
||||
import binnie.botany.api.IFlowerType;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IAlleleTolerance;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import forestry.core.genetics.Genome;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class FlowerGenome extends Genome implements IFlowerGenome {
|
||||
public FlowerGenome(final NBTTagCompound nbttagcompound) {
|
||||
@@ -119,24 +117,24 @@ public class FlowerGenome extends Genome implements IFlowerGenome {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTolerate(final EnumAcidity ePH) {
|
||||
final int pH = ePH.ordinal();
|
||||
public boolean canTolerate(final EnumAcidity acidity) {
|
||||
final int pH = acidity.ordinal();
|
||||
final int[] pHTol = Binnie.GENETICS.getTolerance(this.getTolerancePH());
|
||||
final int fPH = this.getPrimary().getPH().ordinal();
|
||||
return pH >= fPH + pHTol[0] && pH <= fPH + pHTol[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTolerate(final EnumMoisture eMoisture) {
|
||||
final int moisture = eMoisture.ordinal();
|
||||
public boolean canTolerate(final EnumMoisture moist) {
|
||||
final int moisture = moist.ordinal();
|
||||
final int[] moistTol = Binnie.GENETICS.getTolerance(this.getToleranceMoisture());
|
||||
final int fMoisture = this.getPrimary().getMoisture().ordinal();
|
||||
return moisture >= fMoisture + moistTol[0] && moisture <= fMoisture + moistTol[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTolerate(final EnumTemperature eTemp) {
|
||||
final int temp = eTemp.ordinal();
|
||||
public boolean canTolerate(final EnumTemperature temperature) {
|
||||
final int temp = temperature.ordinal();
|
||||
final int[] tempTol = Binnie.GENETICS.getTolerance(this.getToleranceTemperature());
|
||||
final int fTemp = this.getPrimary().getTemperature().ordinal();
|
||||
return temp >= fTemp + tempTol[0] && temp <= fTemp + tempTol[1];
|
||||
|
||||
@@ -16,7 +16,7 @@ import binnie.botany.api.IFlowerRoot;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
|
||||
public class FlowerMutation extends Mutation implements IFlowerMutation, IFlowerMutationBuilder {
|
||||
public FlowerMutation(final IAlleleFlowerSpecies allele0, final IAlleleFlowerSpecies allele1, final IAllele[] template, final int chance) {
|
||||
public FlowerMutation(IAlleleFlowerSpecies allele0, IAlleleFlowerSpecies allele1, IAllele[] template, int chance) {
|
||||
super(allele0, allele1, template, chance);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public class FlowerMutation extends Mutation implements IFlowerMutation, IFlower
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getChance(World world, BlockPos pos, IAlleleFlowerSpecies a0, IAlleleFlowerSpecies a1, IFlowerGenome g0, IFlowerGenome g1) {
|
||||
float processedChance = super.getChance(world, pos, a0, a1, g0, g1, ForestryAPI.climateManager.getDefaultClimate(world, pos));
|
||||
public float getChance(World world, BlockPos pos, IAlleleFlowerSpecies allele0, IAlleleFlowerSpecies allele1, IFlowerGenome genome0, IFlowerGenome genome1) {
|
||||
float processedChance = super.getChance(world, pos, allele0, allele1, genome0, genome1, ForestryAPI.climateManager.getDefaultClimate(world, pos));
|
||||
if (processedChance <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumFlowerChromosome;
|
||||
import binnie.botany.api.EnumFlowerStage;
|
||||
import binnie.botany.api.IAlleleFlowerSpecies;
|
||||
import binnie.botany.api.IBotanistTracker;
|
||||
import binnie.botany.api.IColorMix;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IFlowerGenome;
|
||||
import binnie.botany.api.IFlowerMutation;
|
||||
import binnie.botany.api.IFlowerRoot;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlyzerPlugin;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.ISpeciesType;
|
||||
import forestry.core.genetics.SpeciesRoot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -8,42 +35,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlyzerPlugin;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.ISpeciesType;
|
||||
import forestry.core.genetics.SpeciesRoot;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumFlowerChromosome;
|
||||
import binnie.botany.api.EnumFlowerStage;
|
||||
import binnie.botany.api.IAlleleFlowerSpecies;
|
||||
import binnie.botany.api.IBotanistTracker;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IFlowerGenome;
|
||||
import binnie.botany.api.IFlowerMutation;
|
||||
import binnie.botany.api.IFlowerRoot;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
|
||||
public class FlowerRoot extends SpeciesRoot implements IFlowerRoot {
|
||||
static final String UID = "rootFlowers";
|
||||
public static int flowerSpeciesCount = -1;
|
||||
public static ArrayList<IFlower> flowerTemplates = new ArrayList<>();
|
||||
private static ArrayList<IFlowerMutation> flowerMutations = new ArrayList<>();
|
||||
private static ArrayList<IColourMix> colourMixes = new ArrayList<>();
|
||||
private static ArrayList<IColorMix> colourMixes = new ArrayList<>();
|
||||
Map<ItemStack, IFlower> conversions;
|
||||
|
||||
public FlowerRoot() {
|
||||
@@ -152,7 +149,7 @@ public class FlowerRoot extends SpeciesRoot implements IFlowerRoot {
|
||||
|
||||
@Override
|
||||
public IFlowerGenome templateAsGenome(final IAllele[] templateActive, final IAllele[] templateInactive) {
|
||||
return new FlowerGenome(this.templateAsChromosomes(templateActive, templateInactive));
|
||||
return new FlowerGenome(templateAsChromosomes(templateActive, templateInactive));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -269,12 +266,12 @@ public class FlowerRoot extends SpeciesRoot implements IFlowerRoot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerColourMix(final IColourMix colourMix) {
|
||||
FlowerRoot.colourMixes.add(colourMix);
|
||||
public void registerColourMix(final IColorMix colorMix) {
|
||||
FlowerRoot.colourMixes.add(colorMix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IColourMix> getColourMixes(final boolean shuffle) {
|
||||
public Collection<IColorMix> getColorMixes(final boolean shuffle) {
|
||||
if (shuffle) {
|
||||
Collections.shuffle(FlowerRoot.colourMixes);
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ public enum Attribute implements IWidgetAttribute {
|
||||
CanFocus,
|
||||
NeedsDeletion,
|
||||
AlwaysOnTop,
|
||||
BlockTooltip;
|
||||
BlockTooltip
|
||||
}
|
||||
@@ -3,5 +3,5 @@ package binnie.core.craftgui;
|
||||
public enum RenderStage {
|
||||
PreChildren,
|
||||
PostChildren,
|
||||
PostSiblings;
|
||||
PostSiblings
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class Tooltip {
|
||||
Help,
|
||||
Information,
|
||||
User,
|
||||
Power;
|
||||
Power
|
||||
}
|
||||
|
||||
public interface ITooltipType {
|
||||
|
||||
@@ -55,6 +55,6 @@ class ControlMutationBox extends ControlListBox<IMutation> {
|
||||
|
||||
enum Type {
|
||||
Resultant,
|
||||
Further;
|
||||
Further
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,5 @@ public enum EnumDiscoveryState {
|
||||
Show,
|
||||
Undetermined,
|
||||
Discovered,
|
||||
Undiscovered;
|
||||
Undiscovered
|
||||
}
|
||||
@@ -9,6 +9,6 @@ public class MinecraftGUI {
|
||||
Tinted,
|
||||
Coloured,
|
||||
Outline,
|
||||
TabOutline;
|
||||
TabOutline
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class MinecraftTooltip extends Tooltip {
|
||||
|
||||
public enum Type implements ITooltipType {
|
||||
Error,
|
||||
Warning;
|
||||
Warning
|
||||
}
|
||||
|
||||
private enum TypeColour {
|
||||
|
||||
@@ -2,5 +2,5 @@ package binnie.core.craftgui.renderer;
|
||||
|
||||
public enum TextureType {
|
||||
Stretched,
|
||||
Tiled;
|
||||
Tiled
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class FireworkCreator {
|
||||
LargeBall,
|
||||
Star,
|
||||
Creeper,
|
||||
Burst;
|
||||
Burst
|
||||
}
|
||||
|
||||
public static class Firework {
|
||||
|
||||
@@ -5,6 +5,6 @@ public enum EnumBeeBooleanModifier {
|
||||
Sealed,
|
||||
SelfLighted,
|
||||
SunlightStimulated,
|
||||
Hellish;
|
||||
Hellish
|
||||
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.block.state.pattern.BlockStateMatcher;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.blocks.BlockExtraBeeHive;
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.blocks.BlockExtraBeeHive;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
player.addExhaustion(0.005F);
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0 && te instanceof TileEntityMetadata) {
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<>();
|
||||
TileEntityMetadata tile = (TileEntityMetadata) te;
|
||||
int damage = getDroppedMeta(state, tile.getTileMetadata());
|
||||
ItemStack itemstack = TileEntityMetadata.getItemStack(this, damage);
|
||||
|
||||
@@ -102,6 +102,6 @@ public class ModuleCarpentry implements IInitializable {
|
||||
enum Axis {
|
||||
Y,
|
||||
X,
|
||||
Z;
|
||||
Z
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,6 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -332,7 +331,6 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.SourCherry);
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-1
@@ -54,7 +54,6 @@ public class MultiFenceRecipeSolidWrapper extends BlankRecipeWrapper implements
|
||||
for (IPlankType plankTypeSecondary : WoodManager.getAllPlankTypes()) {
|
||||
for (IPlankType plankType : WoodManager.getAllPlankTypes()) {
|
||||
if (plankType != plankTypeSecondary) {
|
||||
;
|
||||
fences.add(WoodManager.getFence(plankType, plankTypeSecondary, new FenceType(fenceType.size, false, fenceType.embossed), 1));
|
||||
outputFences.add(WoodManager.getFence(plankType, plankTypeSecondary, new FenceType(fenceType.size, true, fenceType.embossed), 2));
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ public class ItemSetSquare extends Item implements IToolHammer, IItemModelRegist
|
||||
public enum EnumSetSquareMode {
|
||||
Rotate,
|
||||
Edit,
|
||||
Swap;
|
||||
Swap
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import binnie.core.resource.BinnieResource;
|
||||
public class MachineRendererKitchen {
|
||||
public static MachineRendererKitchen instance = new MachineRendererKitchen();
|
||||
static int level = 0;
|
||||
;
|
||||
BinnieResource texture;
|
||||
|
||||
public void renderMachine(final Machine machine, final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import binnie.extratrees.ExtraTrees;
|
||||
|
||||
public class MachineRendererNursery {
|
||||
public static MachineRendererNursery instance = new MachineRendererNursery();
|
||||
;
|
||||
BinnieResource texture;
|
||||
//private IModelCustom casinoMachine;
|
||||
private ModelNursery model;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ControlProductsBox extends ControlListBox<ControlProductsBox.Produc
|
||||
|
||||
enum Type {
|
||||
Products,
|
||||
Specialties;
|
||||
Specialties
|
||||
}
|
||||
|
||||
class Product {
|
||||
|
||||
@@ -2,5 +2,5 @@ package binnie.genetics.gui.punnett;
|
||||
|
||||
public enum ExtraBeeGUITexture {
|
||||
Chromosome,
|
||||
Chromosome2;
|
||||
Chromosome2
|
||||
}
|
||||
+1
-1
@@ -164,7 +164,7 @@ public class ComponentApiaristIndexerInventory extends ComponentIndexerInventory
|
||||
public enum Mode {
|
||||
None,
|
||||
Species,
|
||||
Type;
|
||||
Type
|
||||
}
|
||||
|
||||
private static class SpeciesList {
|
||||
|
||||
Reference in new issue
Block a user