aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java
blob: c942db14cf73c3d98d401cd41794d5c8ed929ab5 (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
package gtPlusPlus.xmod.bop.blocks.pine;

import java.util.Random;

import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.chemistry.AgriculturalChem;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
import gtPlusPlus.xmod.bop.blocks.base.LeavesBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class LeavesPineTree extends LeavesBase {

	public LeavesPineTree(){
		super("Pine", "pine", new ItemStack[]{});
		this.treeType = new String[] {"pine"};
		this.leafType = new String[][] {{"pine"},{"pine_opaque"}};
	}

	@Override
	public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){
		return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Pine);
	}

	@Override//Drops when Leaf is broken
	protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){
		Logger.INFO("Dropping Bonus Drops");
		if (MathUtils.randInt(0, 10) >= 9) {
			this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, MathUtils.randInt(1, 4)));
		}
	}

}