diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-02-28 20:06:01 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-02-28 20:06:01 +0000 |
commit | 4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a (patch) | |
tree | f9707c4551b6134030374580cacfd1aec4b0c9d7 /src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java | |
parent | 1c20e21e7678f9a546fff9bf873c80c35a841cf8 (diff) | |
download | GT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.tar.gz GT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.tar.bz2 GT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.zip |
+ Added a new debug tool.
+ Added support for Crops++.
+ Added Custom Crops & framework to support more in future.
+ Added basic support for all GT++ Materials within Tinkers Construct. [WIP]
+ Moderately bad attempt at generating custom Plasma Cooling recipes in the Adv. Vacuum Freezer. [WIP #424]
% Reworked logic for Material.java handling Durability, Tool Quality & Harvest Level.
% Adjusted frequency of structural checks on the Cyclotron, Now 100x less frequent.
% Cleaned up ReflectionUtils.java and made all getters cache their results, for much faster access.
% Attempted to adjust logic of FFPP, but I probably broke it. [WIP]
% Moved static array of Element Names from IonParticles.java -> ELEMENT.java.
$ Greatly improved reflective performance across the mod.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java b/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java new file mode 100644 index 0000000000..ca2a044564 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.bartcrops.abstracts; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import ic2.api.crops.CropCard; +import ic2.api.crops.ICropTile; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import speiger.src.crops.api.ICropCardInfo; + +public abstract class BaseCrop extends CropCard implements ICropCardInfo { + @SideOnly(Side.CLIENT) + public void registerSprites(IIconRegister iconRegister) { + this.textures = new IIcon[this.maxSize()]; + + for (int i = 1; i <= this.textures.length; ++i) { + this.textures[i - 1] = iconRegister.registerIcon(CORE.MODID+":crop/blockCrop." + this.name() + "." + i); + } + + } + + public float dropGainChance() { + return (float) (Math.pow(0.95D, (double) ((float) this.tier())) * (double) 1f); + } + + public boolean canCross(ICropTile crop) { + return crop.getSize() == this.maxSize(); + } + + public int getrootslength(ICropTile crop) { + return 3; + } + + public String discoveredBy() { + return "Alkalus"; + } + + public String owner() { + return "Gtplusplus"; + } + + public List<String> getCropInformation() { + List<String> ret = new ArrayList<String>(); + ret.add(this.attributes().toString()); + return ret; + } + + public ItemStack getDisplayItem(CropCard card) { + return ItemUtils.getItemStackOfAmountFromOreDict("crop" + this.name(), 0); + } +}
\ No newline at end of file |