mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Revert "Use generics for Chromosome type, begin unifying code"
This reverts commit 43e41034f6.
Conflicts:
src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java
src/main/java/forestry/api/genetics/IAlleleSpeciesCustom.java
src/main/java/forestry/core/proxy/ProxyRenderClient.java
This commit is contained in:
1 parent
87f2dc0a0a
commit
efcab41e04
217 files changed
+2408
-3136
No files matched your search
@@ -10,7 +10,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.genetics;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
@@ -18,7 +17,6 @@ import java.util.Random;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.BeeChromosome;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.DefaultBeeModifier;
|
||||
import forestry.api.apiculture.IBee;
|
||||
@@ -26,7 +24,6 @@ import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.apiculture.IBeekeepingMode;
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
public class BeekeepingMode implements IBeekeepingMode {
|
||||
|
||||
@@ -37,34 +34,24 @@ public class BeekeepingMode implements IBeekeepingMode {
|
||||
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, 0.6f, true, true);
|
||||
|
||||
private final Random rand;
|
||||
@Nonnull
|
||||
private final String name;
|
||||
private final boolean reducesFertility;
|
||||
private final boolean canFatigue;
|
||||
private final float mutationModifier;
|
||||
@Nonnull
|
||||
private final IBeeModifier beeModifier;
|
||||
|
||||
private BeekeepingMode(@Nonnull String name, float mutationModifier, float lifespanModifier, float speedModifier, boolean reducesFertility, boolean canFatigue) {
|
||||
public BeekeepingMode(String name, float mutationModifier, float lifespanModifier, float speedModifier, boolean reducesFertility, boolean canFatigue) {
|
||||
this.rand = new Random();
|
||||
this.name = name;
|
||||
this.reducesFertility = reducesFertility;
|
||||
this.canFatigue = canFatigue;
|
||||
this.beeModifier = new BeekeepingModeBeeModifier(mutationModifier, lifespanModifier, speedModifier);
|
||||
this.mutationModifier = mutationModifier;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IGenome<BeeChromosome> genome, IGenome<BeeChromosome> mate) {
|
||||
return mutationModifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> getDescription() {
|
||||
ArrayList<String> ret = new ArrayList<>();
|
||||
@@ -131,13 +118,17 @@ public class BeekeepingMode implements IBeekeepingMode {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNaturalOffspring(IBee queen) {
|
||||
return queen.isNatural();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mayMultiplyPrincess(IBee queen) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBeeModifier getBeeModifier() {
|
||||
return beeModifier;
|
||||
|
||||
Reference in new issue
Block a user