summaryrefslogtreecommitdiff
path: root/src/main/java/jp/plusplus/fbs/api/IHarvestable.java
blob: 1b2f7c2a9f47a95ba36973aa8e23642708e41365 (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
57
58
59
60
61
62
63
64
65
66
67
package jp.plusplus.fbs.api;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

import java.util.ArrayList;
import java.util.Random;

/**
 * Created by plusplus_F on 2015/11/09.
 * 右クリックで収穫可能なブロック
 */
public interface IHarvestable {
    /**
     * 収穫可能な状態にあるか調べる
     * @param world
     * @param x
     * @param y
     * @param z
     * @return
     */
    public boolean canHarvest(World world, int x, int y, int z);

    /**
     * 収穫可能な状態を目指して成長させる
     * @param world
     * @param x
     * @param y
     * @param z
     * @param rand
     */
    public void glow(World world, int x, int y, int z, Random rand);

    /**
     * 収穫可能なアイテムの一覧を入手する
     * @param world
     * @param x
     * @param y
     * @param z
     * @return
     */
    public ArrayList<ItemStack> getHarvestItems(World world, int x, int y, int z);

    /**
     * プレイヤーによって収穫する
     * @param world
     * @param x
     * @param y
     * @param z
     * @param player
     * @param rand
     * @return
     */
    public ArrayList<ItemStack> harvest(World world, int x, int y, int z, Random rand, EntityPlayer player);

    /**
     * 収穫機など、プレイヤー以外が収穫する
     * @param world
     * @param x
     * @param y
     * @param z
     * @param rand
     * @return
     */
    public ArrayList<ItemStack> harvest(World world, int x, int y, int z, Random rand);
}