Clean Up Api

This commit is contained in:
Nedelosk committed 2016-10-22 19:18:25 +02:00
1 parent 8b1bce6963
commit 0806d2ac38
7 files changed
+29 -34

No files matched your search

@@ -1,11 +1,11 @@
package binnie.botany.api;
public interface IColourMix {
IFlowerColour getColour1();
IFlowerColour getColourFirst();
IFlowerColour getColour2();
IFlowerColour getColourSecond();
boolean isMutation(final IFlowerColour p0, final IFlowerColour p1);
boolean isMutation(IFlowerColour colourFirst, IFlowerColour colourSecond);
int getChance();
@@ -11,36 +11,36 @@ import java.util.List;
public interface IFlowerRoot extends ISpeciesRoot {
@Override
IFlower getMember(final ItemStack p0);
IFlower getMember(ItemStack memberStack);
@Override
IFlower templateAsIndividual(final IAllele[] p0);
IFlower templateAsIndividual(IAllele[] template);
@Override
IFlower templateAsIndividual(final IAllele[] p0, final IAllele[] p1);
IFlower templateAsIndividual(IAllele[] templateFirst, IAllele[] templateSecond);
@Override
IFlowerGenome templateAsGenome(final IAllele[] p0);
IFlowerGenome templateAsGenome(IAllele[] template);
@Override
IFlowerGenome templateAsGenome(final IAllele[] p0, final IAllele[] p1);
IFlowerGenome templateAsGenome(IAllele[] templateFrist, IAllele[] templateSecond);
@Override
IBotanistTracker getBreedingTracker(final World p0, final GameProfile p1);
IBotanistTracker getBreedingTracker(World world, GameProfile profile);
@Override
List<? extends IFlowerMutation> getMutations(boolean shuffle);
@Override
EnumFlowerStage getType(ItemStack itemStack);
IFlower getFlower(World world, IFlowerGenome genome);
IFlower getFlower(final World p0, final IFlowerGenome genome);
void addConversion(ItemStack memberStack, IAllele[] template);
void addConversion(final ItemStack p0, final IAllele[] p1);
IFlower getConversion(ItemStack memberStack);
IFlower getConversion(final ItemStack p0);
Collection<IColourMix> getColourMixes(boolean p0);
Collection<IColourMix> getColourMixes(final boolean p0);
void registerColourMix(final IColourMix p0);
void registerColourMix(IColourMix colourMix);
}
@@ -7,19 +7,19 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IBlockSoil {
EnumAcidity getPH(final World p0, final BlockPos pos);
EnumAcidity getPH(World world, BlockPos pos);
EnumMoisture getMoisture(final World p0, final BlockPos pos);
EnumMoisture getMoisture(World world, BlockPos pos);
EnumSoilType getType(final World p0, final BlockPos pos);
EnumSoilType getType(World world, BlockPos pos);
boolean fertilise(final World p0, final BlockPos pos, final EnumSoilType p4);
boolean fertilise(World world, BlockPos pos, EnumSoilType soilType);
boolean degrade(final World p0, final BlockPos pos, final EnumSoilType p4);
boolean degrade(World world, BlockPos pos, EnumSoilType soilType);
boolean setPH(final World p0, final BlockPos pos, final EnumAcidity p4);
boolean setPH(World world, BlockPos pos, EnumAcidity acidity);
boolean setMoisture(final World p0, final BlockPos pos, final EnumMoisture p4);
boolean setMoisture(World world, BlockPos pos, EnumMoisture moisture);
boolean resistsWeeds(final World p0, final BlockPos pos);
boolean resistsWeeds(World world, BlockPos pos);
}
@@ -10,12 +10,12 @@ public class ColourMix implements IColourMix {
int chance;
@Override
public IFlowerColour getColour1() {
public IFlowerColour getColourFirst() {
return this.colour1;
}
@Override
public IFlowerColour getColour2() {
public IFlowerColour getColourSecond() {
return this.colour2;
}
@@ -22,8 +22,8 @@ public class ControlColourMixItem extends ControlOption<IColourMix> {
this.arrowSymbol = new ControlColourMixSymbol(this, 64, 4, 1);
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
if (this.getValue() != null) {
this.itemWidget1.setValue(this.getValue().getColour1());
this.itemWidget2.setValue(this.getValue().getColour2());
this.itemWidget1.setValue(this.getValue().getColourFirst());
this.itemWidget2.setValue(this.getValue().getColourSecond());
this.itemWidget3.setValue(this.getValue().getResult());
this.addSymbol.setValue(this.getValue());
this.arrowSymbol.setValue(this.getValue());
@@ -26,7 +26,7 @@ public class PageColourMix extends PageAbstract<IFlowerColour> {
public void onValueChanged(final IFlowerColour colour) {
final List<IColourMix> mixes = new ArrayList<>();
for (final IColourMix mix : BotanyCore.getFlowerRoot().getColourMixes(false)) {
if (mix.getColour1() == colour || mix.getColour2() == colour) {
if (mix.getColourFirst() == colour || mix.getColourSecond() == colour) {
mixes.add(mix);
}
}
@@ -224,14 +224,9 @@ public class ContainerCraftGUI extends Container {
return false;
}
//TODO: Fix random NullPointerException
@Override
public void detectAndSendChanges() {
for (int i = 0; i < this.inventorySlots.size(); ++i){
Object o = this.inventorySlots.get(i);
if(o == null){
getClass();
}
}
super.detectAndSendChanges();
final ITankMachine tanks = Machine.getInterface(ITankMachine.class, this.window.getInventory());
final IPoweredMachine powered = Machine.getInterface(IPoweredMachine.class, this.window.getInventory());