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

import java.util.Random;

import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

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;

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)));
        }
    }
}