Java Code Examples for org.bukkit.Material#CAULDRON

The following examples show how to use org.bukkit.Material#CAULDRON . 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: PressureChamber.java    From Slimefun4 with GNU General Public License v3.0 5 votes vote down vote up
public PressureChamber(Category category, SlimefunItemStack item) {
    super(category, item, new ItemStack[] { 
            SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14) ? new ItemStack(Material.SMOOTH_STONE_SLAB) : new ItemStack(Material.STONE_SLAB), new CustomItem(Material.DISPENSER, "Dispenser (Facing down)"), SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14) ? new ItemStack(Material.SMOOTH_STONE_SLAB) : new ItemStack(Material.STONE_SLAB), 
            new ItemStack(Material.PISTON), new ItemStack(Material.GLASS), new ItemStack(Material.PISTON), 
            new ItemStack(Material.PISTON), new ItemStack(Material.CAULDRON), new ItemStack(Material.PISTON) 
    }, new ItemStack[0], BlockFace.UP);
}
 
Example 2
Source File: Cauldron.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public Cauldron() {
    super(Material.CAULDRON);
}
 
Example 3
Source File: Cauldron.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
/**
 * @param data the raw data value
 * @deprecated Magic value
 */
@Deprecated
public Cauldron(byte data) {
    super(Material.CAULDRON, data);
}
 
Example 4
Source File: Kitchen.java    From ExoticGarden with GNU General Public License v3.0 4 votes vote down vote up
public Kitchen(ExoticGarden plugin, Category category) {
    super(category, new SlimefunItemStack("KITCHEN", Material.CAULDRON, "&eKitchen", "", "&a&oYou can make a bunch of different yummies here!", "&a&oThe result goes in the Furnace output slot"), new ItemStack[] { new CustomItem(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), new CustomItem(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), new ItemStack(Material.BRICKS), new ItemStack(Material.STONE_PRESSURE_PLATE), new ItemStack(Material.IRON_TRAPDOOR), new ItemStack(Material.BOOKSHELF), new ItemStack(Material.FURNACE), new ItemStack(Material.DISPENSER), new ItemStack(Material.CRAFTING_TABLE) }, new ItemStack[0], BlockFace.SELF);

    this.plugin = plugin;
}
 
Example 5
Source File: OreWasher.java    From Slimefun4 with GNU General Public License v3.0 4 votes vote down vote up
public OreWasher(Category category, SlimefunItemStack item) {
    super(category, item, new ItemStack[] { null, new ItemStack(Material.DISPENSER), null, null, new ItemStack(Material.OAK_FENCE), null, null, new ItemStack(Material.CAULDRON), null }, new ItemStack[0], BlockFace.SELF);

    legacyMode = SlimefunPlugin.getCfg().getBoolean("options.legacy-ore-washer");
    dusts = new ItemStack[] { SlimefunItems.IRON_DUST, SlimefunItems.GOLD_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.TIN_DUST, SlimefunItems.ZINC_DUST, SlimefunItems.ALUMINUM_DUST, SlimefunItems.MAGNESIUM_DUST, SlimefunItems.LEAD_DUST, SlimefunItems.SILVER_DUST };
}
 
Example 6
Source File: AutomatedPanningMachine.java    From Slimefun4 with GNU General Public License v3.0 4 votes vote down vote up
public AutomatedPanningMachine(Category category, SlimefunItemStack item) {
    super(category, item, new ItemStack[] { null, null, null, null, new ItemStack(Material.OAK_TRAPDOOR), null, null, new ItemStack(Material.CAULDRON), null }, new ItemStack[0], BlockFace.SELF);
}
 
Example 7
Source File: ItemListener.java    From Carbon with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
   public void onCauldronClick(PlayerInteractEvent evt) {
       if (evt.getAction() == Action.RIGHT_CLICK_BLOCK) {
           if (evt.getBlockFace() == BlockFace.UP && evt.getClickedBlock().getType() == Material.CAULDRON && evt.getItem() != null && evt.getItem().getType() == Carbon.injector().bannerItemMat) {
           	evt.setCancelled(true);
           	ItemStack originalBanner = evt.getItem();
           	//create new banner with latest pattern removed
               net.minecraft.server.v1_7_R4.ItemStack nmsNewBanner = CraftItemStack.asNMSCopy(originalBanner);
               NBTTagCompound tag = nmsNewBanner.getTag();
               byte waterLevel = evt.getClickedBlock().getData();
               if (waterLevel > 0 && tag != null && tag.hasKey("BlockEntityTag") && tag.getCompound("BlockEntityTag").hasKey("Patterns")) {
                NBTTagCompound compound = tag.getCompound("BlockEntityTag");
                NBTTagList list = compound.getList("Patterns", 10);
                NBTTagList newList = new NBTTagList();
                for (int n = 0; n < list.size() - 1; n++) {
                    newList.add(list.get(n));
                }
                if (newList.size() > 0) {
                	compound.set("Patterns", newList);
                } else {
                	compound.remove("Patterns");
                }
                ItemStack newBannerItem = CraftItemStack.asCraftMirror(nmsNewBanner);
                newBannerItem.setAmount(1);
                //update cauldron
                evt.getClickedBlock().setData(--waterLevel);
                //update used itemstack
                if (originalBanner.getAmount() > 1) {
                	evt.getItem().setAmount(originalBanner.getAmount() - 1);
                } else {
                	evt.getItem().setAmount(0);
                	evt.getPlayer().setItemInHand(null);
                }
                //add new banner
                evt.getPlayer().getInventory().addItem(newBannerItem);
                evt.getPlayer().updateInventory();
               }
           }
       }
   }