Examples of ItemFrame


Examples of org.bukkit.entity.ItemFrame

    @Override
    public boolean replace(boolean shouldDrop)
    {
        try
        {
            ItemFrame f = getWorld().spawn(location.getBlock().getRelative(hanging.getAttachedFace()).getLocation(), ItemFrame.class);
            f.teleport(location);
            f.setItem(((ItemFrame) hanging).getItem());
            f.setRotation(((ItemFrame) hanging).getRotation());
            f.setFacingDirection(hanging.getFacing(), true);
        } catch (IllegalArgumentException e)
        {
            return false;
        }
View Full Code Here

Examples of org.bukkit.entity.ItemFrame

    @Override
    public boolean drop(boolean forced)
    {
        if (forced || new Random().nextInt(100) < CreeperConfig.getInt(CfgVal.DROP_CHANCE))
        {
            ItemFrame f = (ItemFrame) hanging;
            ItemStack s = f.getItem();
            if (s.getType() != Material.AIR)
                getWorld().dropItemNaturally(getLocation(), s);
            getWorld().dropItemNaturally(getLocation(), new ItemStack(389, 1));
            return true;
        }
View Full Code Here

Examples of org.spout.vanilla.component.entity.substance.ItemFrame

    }

    World world = block.getWorld();
    Point pos = block.getPosition();
    Entity e = world.createEntity(new Point(world, pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()), ItemFrame.class);
    ItemFrame frame = e.add(ItemFrame.class);
    frame.setOrientation(face);
    world.spawnEntity(e);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.