summaryrefslogtreecommitdiff
path: root/src/main/java/jp/plusplus/fbs/pottery/usable/PotteryUnbreakable.java
blob: a4b2ddd464c0af71da75cc2b1a009f45f1819060 (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
package jp.plusplus.fbs.pottery.usable;

import com.google.common.collect.Maps;
import cpw.mods.fml.common.registry.GameData;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Map;
import java.util.Random;

/**
 * Created by plusplus_F on 2016/03/30.
 */
public class PotteryUnbreakable extends PotteryKeep {
    @Override
    public String getUnlocalizedName() {
        return "pottery.fbs.pot.unbreakable";
    }

    @Override
    public float getPriceScale(ItemStack pottery){
        return 5.0f;
    }

    @Override
    public boolean canTakeStack(EntityPlayer player, ItemStack pottery, int index, ItemStack itemStack){
        return !pottery.getTagCompound().getBoolean(CHANGED_INDEXES+index);
    }

    @Override
    public void onCrash(EntityPlayer player, ItemStack pottery){}
}