@Override public MCMaterial getMaterial() { return new BukkitMCMaterial(f.getBlockData().getMaterial()); }
@EventHandler public void onBlockFall(EntityChangeBlockEvent event) { if (event.getEntity() instanceof FallingBlock) { if (BlockStorage.hasBlockInfo(event.getBlock())) { event.setCancelled(true); FallingBlock fb = (FallingBlock) event.getEntity(); if (fb.getDropItem()) { fb.getWorld().dropItemNaturally(fb.getLocation(), new ItemStack(fb.getBlockData().getMaterial(), 1)); } } } }
ItemStack itemStack = new ItemStack(entity.getMaterial(), 1, entity.getBlockData()); Item item = block.getWorld().dropItem(entity.getLocation(), itemStack); item.setVelocity(new Vector());
ItemStack itemStack = new ItemStack(fallingBlock.getBlockData().getMaterial(), 1); Item item = block.getWorld().dropItem(fallingBlock.getLocation(), itemStack); item.setVelocity(new Vector());