Java Code Examples for cn.nukkit.item.ItemString

The following examples show how to use cn.nukkit.item.ItemString. These examples are extracted from open source projects. 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 Project: Jupiter   Source File: BlockCobweb.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    if (item.isShears() || item.isSword()) {
        if (item.isSilkTouch()){
            return new Item[]{
                    this.toItem()
            };
        } else {
            return new Item[]{
                    new ItemString()
            };
        }
    } else {
        return new Item[0];
    }
}
 
Example 2
Source Project: Nukkit   Source File: BlockCobweb.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    if (item.isShears() || item.isSword()) {
        return new Item[]{
                new ItemString()
        };
    } else {
        return new Item[0];
    }
}
 
Example 3
Source Project: Nukkit   Source File: BlockCobweb.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public Item[] getDrops(Item item) {
    if (item.isShears() || item.isSword()) {
        return new Item[]{
                new ItemString()
        };
    } else {
        return new Item[0];
    }
}
 
Example 4
Source Project: Jupiter   Source File: EntitySpider.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item[] getDrops() {
    return new Item[]{new ItemString(0, random.nextRange(0, 2)), new ItemSpiderEye(0, random.nextRange(0, 1))};
}
 
Example 5
Source Project: Jupiter   Source File: EntityCaveSpider.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item[] getDrops() {
    return new Item[]{new ItemString(0, random.nextRange(0, 2)), new ItemSpiderEye(0, random.nextRange(0, 1))};
}
 
Example 6
Source Project: Jupiter   Source File: BlockTripWire.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item toItem() {
    return new ItemString();
}
 
Example 7
Source Project: Nukkit   Source File: BlockTripWire.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item toItem() {
    return new ItemString();
}
 
Example 8
Source Project: Nukkit   Source File: BlockTripWire.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Item toItem() {
    return new ItemString();
}