aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2022-08-29 16:04:28 +0200
committerGitHub <noreply@github.com>2022-08-29 16:04:28 +0200
commit7d1f51a8937e0a86486267437d444696e81e8aa0 (patch)
treea5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/bartcrops/abstracts
parent5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff)
downloadGT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip
Buildscript + Spotless (#318)
* Convert AES.java to readable class * Buildscript * Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/bartcrops/abstracts')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java79
-rw-r--r--src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java106
3 files changed, 119 insertions, 121 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java
index f62b429acb..41631eaae8 100644
--- a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java
+++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java
@@ -4,34 +4,33 @@ import gtPlusPlus.preloader.CORE_Preloader;
import ic2.api.crops.ICropTile;
public abstract class BaseAestheticCrop extends BaseHarvestableCrop {
-
- public int tier() {
- return 1;
- }
- public int stat(int n) {
- switch (n) {
- case 0 :
- return 0;
- case 1 :
- return 0;
- case 2 :
- return 0;
- case 3 :
- return 4;
- case 4 :
- return 0;
- default :
- return 0;
- }
- }
+ public int tier() {
+ return 1;
+ }
- public int growthDuration(ICropTile crop) {
- return CORE_Preloader.DEBUG_MODE ? 1 : 225;
- }
+ public int stat(int n) {
+ switch (n) {
+ case 0:
+ return 0;
+ case 1:
+ return 0;
+ case 2:
+ return 0;
+ case 3:
+ return 4;
+ case 4:
+ return 0;
+ default:
+ return 0;
+ }
+ }
- public byte getSizeAfterHarvest(ICropTile crop) {
- return 1;
- }
-
-} \ No newline at end of file
+ public int growthDuration(ICropTile crop) {
+ return CORE_Preloader.DEBUG_MODE ? 1 : 225;
+ }
+
+ public byte getSizeAfterHarvest(ICropTile crop) {
+ return 1;
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java
index 271e3ad7eb..32c9dbf0f6 100644
--- a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java
+++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java
@@ -15,43 +15,42 @@ 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(Arrays.toString(this.attributes()));
- return ret;
- }
-
- public ItemStack getDisplayItem(CropCard card) {
- return ItemUtils.getItemStackOfAmountFromOreDict("crop" + this.name(), 0);
- }
-} \ No newline at end of file
+
+ @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(Arrays.toString(this.attributes()));
+ return ret;
+ }
+
+ public ItemStack getDisplayItem(CropCard card) {
+ return ItemUtils.getItemStackOfAmountFromOreDict("crop" + this.name(), 0);
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java
index e877233c67..3d56bba979 100644
--- a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java
+++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java
@@ -4,66 +4,66 @@ import gtPlusPlus.preloader.CORE_Preloader;
import ic2.api.crops.ICropTile;
public abstract class BaseHarvestableCrop extends BaseCrop {
-
- public int tier() {
- return 2;
- }
- public int stat(int n) {
- switch (n) {
- case 0 :
- return 0;
- case 1 :
- return 4;
- case 2 :
- return 0;
- case 3 :
- return 4;
- case 4 :
- return 0;
- default :
- return 0;
- }
- }
+ public int tier() {
+ return 2;
+ }
- public boolean canGrow(ICropTile crop) {
- return crop.getSize() < 3;
- }
+ public int stat(int n) {
+ switch (n) {
+ case 0:
+ return 0;
+ case 1:
+ return 4;
+ case 2:
+ return 0;
+ case 3:
+ return 4;
+ case 4:
+ return 0;
+ default:
+ return 0;
+ }
+ }
- public int getOptimalHavestSize(ICropTile crop) {
- return 3;
- }
+ public boolean canGrow(ICropTile crop) {
+ return crop.getSize() < 3;
+ }
- public boolean canBeHarvested(ICropTile crop) {
- return crop.getSize() == 3;
- }
+ public int getOptimalHavestSize(ICropTile crop) {
+ return 3;
+ }
- public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) {
- return (int) ((double) humidity * 1.2D + (double) nutrients * 0.9D + (double) air * 0.9D);
- }
+ public boolean canBeHarvested(ICropTile crop) {
+ return crop.getSize() == 3;
+ }
- public int growthDuration(ICropTile crop) {
- short r;
- if (CORE_Preloader.DEBUG_MODE) {
- r = 1;
- } else if (crop.getSize() == 2) {
- r = 200;
- } else {
- r = 700;
- }
+ public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) {
+ return (int) ((double) humidity * 1.2D + (double) nutrients * 0.9D + (double) air * 0.9D);
+ }
- return r;
- }
+ public int growthDuration(ICropTile crop) {
+ short r;
+ if (CORE_Preloader.DEBUG_MODE) {
+ r = 1;
+ } else if (crop.getSize() == 2) {
+ r = 200;
+ } else {
+ r = 700;
+ }
- public byte getSizeAfterHarvest(ICropTile crop) {
- return 2;
- }
+ return r;
+ }
- public int maxSize() {
- return 3;
- }
+ public byte getSizeAfterHarvest(ICropTile crop) {
+ return 2;
+ }
- public String discoveredBy() {
- return "Alkalus";
- }
-} \ No newline at end of file
+ public int maxSize() {
+ return 3;
+ }
+
+ public String discoveredBy() {
+ return "Alkalus";
+ }
+}