aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java
blob: a921182d66e2c17a49360cc9a1464af6559dd05a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package gtPlusPlus.xmod.bartcrops.crops;

import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop;
import ic2.api.crops.ICropTile;
import net.minecraft.item.ItemStack;

public class Crop_Hemp extends BaseAestheticCrop {
	
	public int tier() {
		return 2;
	}

	public String name() {
		return "Hemp";
	}

	public String discoveredBy() {
		return "Alkalus";
	}

	public int growthDuration(ICropTile crop) {
		int ret = 550;
		
		/*if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) {
			ret = 225;
		}*/

		if (CORE.DEBUG) {
			ret = 1;
		}

		return ret;
	}

	public String[] attributes() {
		return new String[]{"Green", "Soil", "Orange"};
	}

	public ItemStack getGain(ICropTile crop) {
		
		ItemStack ret = this.getDisplayItem();
		if (MathUtils.randInt(0, 10) > 8) {
			ret = ItemUtils.getSimpleStack(ModItems.itemRope, MathUtils.randInt(1, 3));
		}

		return ret;
	}

	public ItemStack getDisplayItem() {
		return ItemUtils.getSimpleStack(ModItems.itemRope, 0);
	}
}