cn.nukkit.item.ItemPrismarineCrystals Java Examples

The following examples show how to use cn.nukkit.item.ItemPrismarineCrystals. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityElderGuardian.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Item[] getDrops() {
    Item drops[] = new Item[4];
    drops[0] = new ItemPrismarineCrystals(0, random.nextRange(0, 1));
    drops[1] = new ItemPrismarineShard(0, random.nextRange(0, 2));
    //TODO: 60%の確率で生魚、25%の確率で生鮭、2%の確率でクマノミ、13%の確率でフグ。また焼死時には焼き魚、焼き鮭をドロップ
    if (this.getLastDamageCause() instanceof EntityDamageByEntityEvent) {
        drops[2] = new ItemBlock(new BlockSponge());
    }
    return drops;
}
 
Example #2
Source File: EntityGuardian.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Item[] getDrops() {
    Item drops[] = new Item[3];
    drops[0] = new ItemPrismarineCrystals(0, random.nextRange(0, 1));
    drops[1] = new ItemPrismarineShard(0, random.nextRange(0, 2));
    //TODO: 60%の確率で生魚、25%の確率で生鮭、2%の確率でクマノミ、13%の確率でフグ、また焼死時には焼き魚、焼き鮭をドロップ
    return drops;
}
 
Example #3
Source File: BlockSeaLantern.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    if (item.isSilkTouch()){
        return new Item[]{
            this.toItem()
        };
    } else {
        return new Item[]{
                new ItemPrismarineCrystals(0, ThreadLocalRandom.current().nextInt(2, 4))
        };
    }
}
 
Example #4
Source File: BlockSeaLantern.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    return new Item[]{
            new ItemPrismarineCrystals(0, ThreadLocalRandom.current().nextInt(2, 4))
    };
}
 
Example #5
Source File: BlockSeaLantern.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    return new Item[]{
            new ItemPrismarineCrystals(0, ThreadLocalRandom.current().nextInt(2, 4))
    };
}