Package org.bukkit.material

Examples of org.bukkit.material.CocoaPlant


                }

                return true;

            case COCOA:
                CocoaPlant plant = (CocoaPlant) blockState.getData();

                if (greenTerra || getGreenThumbStage() > 1) {
                    plant.setSize(CocoaPlantSize.MEDIUM);
                }
                else {
                    plant.setSize(CocoaPlantSize.SMALL);
                }

                return true;

            default:
View Full Code Here


                if (data instanceof Tree &&
                        ((Tree) data).getSpecies() == TreeSpecies.JUNGLE &&
                        target.getRelative(face).getType() == Material.AIR) {
                    final GlowBlockState state = target.getRelative(face).getState();
                    state.setType(Material.COCOA);
                    state.setData(new CocoaPlant(CocoaPlantSize.SMALL, face.getOppositeFace()));
                    state.update(true);

                    // deduct from stack if not in creative mode
                    if (player.getGameMode() != GameMode.CREATIVE) {
                        holding.setAmount(holding.getAmount() - 1);
View Full Code Here

                        final BlockFace face = getCocoaFace(i);
                        final CocoaPlantSize size = getCocoaSize(random.nextInt(3));
                        final Block block = delegate.getBlockState(loc.getWorld(), sourceX, sourceY + height - 5 + y, sourceZ)
                                .getBlock().getRelative(face);
                        delegate.setTypeAndData(loc.getWorld(), block.getX(), block.getY(), block.getZ(),
                                Material.COCOA, new CocoaPlant(size, face.getOppositeFace()));
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.bukkit.material.CocoaPlant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.