mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Cleanup, Fix Allele Propertys
This commit is contained in:
1 parent
2f711b0493
commit
339bbbe0f7
8 files changed
+27
-8
No files matched your search
@@ -5,12 +5,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleComparable;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating an {@link IFruitProvider}.
|
||||
*/
|
||||
public interface IAlleleFruit extends IAllele {
|
||||
public interface IAlleleFruit extends IAlleleComparable<IAlleleFruit> {
|
||||
|
||||
IFruitProvider getProvider();
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.genetics.IAlleleComparable;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public interface IAlleleTreeSpecies extends IAlleleSpecies<TreeChromosome> {
|
||||
public interface IAlleleTreeSpecies extends IAlleleSpecies<TreeChromosome>, IAlleleComparable<IAlleleTreeSpecies> {
|
||||
|
||||
@Override
|
||||
ITreeRoot getRoot();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package forestry.api.genetics;
|
||||
|
||||
public interface IAlleleComparable<A extends IAlleleComparable<A>> extends IAllele, Comparable<A> {
|
||||
|
||||
/**
|
||||
* To campare the allele for the propertys
|
||||
*/
|
||||
@Override
|
||||
int compareTo(A o);
|
||||
|
||||
}
|
||||
@@ -72,7 +72,6 @@ import forestry.core.blocks.propertys.UnlistedBlockAccess;
|
||||
import forestry.core.blocks.propertys.UnlistedBlockPos;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.plugins.PluginArboriculture;
|
||||
|
||||
public class BlockForestryLeaves extends BlockLeavesBase implements ITileEntityProvider, IShearable, IGrowable, IItemModelRegister {
|
||||
|
||||
|
||||
@@ -96,5 +96,10 @@ public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
|
||||
public String getModID() {
|
||||
return getProvider().getModID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(IAlleleFruit o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -139,5 +139,10 @@ public class AlleleTreeSpecies extends AlleleSpecies<TreeChromosome> implements
|
||||
public IModelProvider getModelProvider() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(IAlleleTreeSpecies o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,9 +12,9 @@ package forestry.core.blocks.propertys;
|
||||
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleComparable;
|
||||
|
||||
public abstract class PropertyAllele<A extends IAllele & Comparable<A>> implements IProperty<A> {
|
||||
public abstract class PropertyAllele<A extends IAlleleComparable<A>> implements IProperty<A> {
|
||||
|
||||
protected final String name;
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.b3d.B3DLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
import forestry.apiculture.entities.EntityFXBee;
|
||||
import forestry.apiculture.render.ParticleRenderer;
|
||||
import forestry.apiculture.render.TextureHabitatLocator;
|
||||
|
||||
Reference in new issue
Block a user