Java Code Examples for org.bukkit.Material#COBBLESTONE
The following examples show how to use
org.bukkit.Material#COBBLESTONE .
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: ItemsTests.java From Civs with GNU General Public License v3.0 | 6 votes |
@Test public void cvInventoryAddItemsShouldAddToCorrectIndexes() { TestUtil.world.setChunkLoaded(false); CVInventory cvInventory = new CVInventory(new Location(TestUtil.world, 0, 0, 0)); ItemStack[] itemStacks = { new ItemStack(Material.COBBLESTONE, 64), new ItemStack(Material.COBBLESTONE, 32), new ItemStack(Material.GRAVEL, 4) }; cvInventory.addItem(itemStacks); assertEquals(Material.GRAVEL, cvInventory.getItem(2).getType()); ItemStack[] itemStack2 = { new ItemStack(Material.COBBLESTONE, 4) }; cvInventory.addItem(itemStack2); assertNull(cvInventory.getItem(3)); assertEquals(36, cvInventory.getItem(1).getAmount()); ItemStack[] itemStack3 = { new ItemStack(Material.COBBLESTONE, 64) }; cvInventory.addItem(itemStack3); assertEquals(64, cvInventory.getItem(1).getAmount()); assertEquals(36, cvInventory.getItem(3).getAmount()); cvInventory.removeItem(itemStack2); assertEquals(60, cvInventory.getItem(0).getAmount()); }
Example 2
Source File: GrindStone.java From Slimefun4 with GNU General Public License v3.0 | 6 votes |
public GrindStone(Category category, SlimefunItemStack item) { super(category, item, new ItemStack[] {null, null, null, null, new ItemStack(Material.OAK_FENCE), null, null, new CustomItem(Material.DISPENSER, "Dispenser (Facing up)"), null}, new ItemStack[] { new ItemStack(Material.BLAZE_ROD), new ItemStack(Material.BLAZE_POWDER, 4), new ItemStack(Material.BONE), new ItemStack(Material.BONE_MEAL, 4), new ItemStack(Material.GRAVEL), new ItemStack(Material.FLINT), new ItemStack(Material.ENDER_EYE), new CustomItem(SlimefunItems.ENDER_LUMP_1, 2), new ItemStack(Material.COBBLESTONE), new ItemStack(Material.GRAVEL), new ItemStack(Material.ANDESITE), new ItemStack(Material.GRAVEL), new ItemStack(Material.DIORITE), new ItemStack(Material.GRAVEL), new ItemStack(Material.GRANITE), new ItemStack(Material.GRAVEL), new ItemStack(Material.DIRT), SlimefunItems.STONE_CHUNK, new ItemStack(Material.SANDSTONE), new ItemStack(Material.SAND, 4), new ItemStack(Material.RED_SANDSTONE), new ItemStack(Material.RED_SAND, 4), new ItemStack(Material.PRISMARINE_BRICKS), new ItemStack(Material.PRISMARINE, 2), new ItemStack(Material.PRISMARINE), new ItemStack(Material.PRISMARINE_SHARD, 4) }, BlockFace.SELF ); }
Example 3
Source File: TestRecipeService.java From Slimefun4 with GNU General Public License v3.0 | 6 votes |
@Test public void testFurnaceOutput() { MinecraftRecipeService service = new MinecraftRecipeService(plugin); NamespacedKey key = new NamespacedKey(plugin, "furnace_recipe_test2"); ItemStack result = new ItemStack(Material.GOLD_BLOCK); MaterialChoice materials = new MaterialChoice(Material.DIRT, Material.COBBLESTONE); FurnaceRecipe recipe = new FurnaceRecipe(key, result, materials, 1, 2); server.addRecipe(recipe); // The Snapshot has not been taken, so it should fallback to an empty Optional Assertions.assertFalse(service.getFurnaceOutput(new ItemStack(Material.DIRT)).isPresent()); service.refresh(); Assertions.assertFalse(service.getFurnaceOutput(null).isPresent()); Assertions.assertFalse(service.getFurnaceOutput(new ItemStack(Material.BEDROCK)).isPresent()); Optional<ItemStack> optional = service.getFurnaceOutput(new ItemStack(Material.DIRT)); Assertions.assertTrue(optional.isPresent()); Assertions.assertEquals(result, optional.get()); Optional<ItemStack> optional2 = service.getFurnaceOutput(new ItemStack(Material.COBBLESTONE)); Assertions.assertTrue(optional2.isPresent()); Assertions.assertEquals(result, optional2.get()); }
Example 4
Source File: ItemsTests.java From Civs with GNU General Public License v3.0 | 5 votes |
@Test public void cvInventoryCheckItemsShouldNotAdd() { TestUtil.world.setChunkLoaded(false); CVInventory cvInventory = new CVInventory(new Location(TestUtil.world, 0, 0, 0)); ItemStack[] itemStacks = { new ItemStack(Material.COBBLESTONE, 64), new ItemStack(Material.COBBLESTONE, 32), new ItemStack(Material.GRAVEL, 4) }; Map<Integer, ItemStack> returnedItems = cvInventory.checkAddItems(itemStacks); assertNull(cvInventory.getItem(0)); assertTrue(returnedItems.isEmpty()); }
Example 5
Source File: Compressor.java From Slimefun4 with GNU General Public License v3.0 | 5 votes |
public Compressor(Category category, SlimefunItemStack item) { super(category, item, new ItemStack[] {null, null, null, null, new ItemStack(Material.NETHER_BRICK_FENCE), null, new ItemStack(Material.PISTON), new CustomItem(Material.DISPENSER, "Dispenser (Facing up)"), new ItemStack(Material.PISTON)}, new ItemStack[] { new CustomItem(SlimefunItems.STONE_CHUNK, 4), new ItemStack(Material.COBBLESTONE), new ItemStack(Material.FLINT, 8), new ItemStack(Material.COBBLESTONE) }, BlockFace.SELF ); }
Example 6
Source File: UtilTests.java From Civs with GNU General Public License v3.0 | 4 votes |
@Test public void cvItemShouldCreateItemStack() { CVItem cvItem = new CVItem(Material.COBBLESTONE,1, 100, "CustomCobble"); ItemStack is = cvItem.createItemStack(); assertEquals(Material.COBBLESTONE, is.getType()); }
Example 7
Source File: OreCrusher.java From Slimefun4 with GNU General Public License v3.0 | 4 votes |
public OreCrusher(Category category, SlimefunItemStack item) { super(category, item, new ItemStack[] { null, null, null, null, new ItemStack(Material.NETHER_BRICK_FENCE), null, new ItemStack(Material.IRON_BARS), new CustomItem(Material.DISPENSER, "Dispenser (Facing up)"), new ItemStack(Material.IRON_BARS) }, new ItemStack[] { new ItemStack(Material.COBBLESTONE, 8), new ItemStack(Material.SAND, 1), SlimefunItems.GOLD_4K, SlimefunItems.GOLD_DUST, new ItemStack(Material.GRAVEL), new ItemStack(Material.SAND), new ItemStack(Material.MAGMA_BLOCK, 4), SlimefunItems.SULFATE }, BlockFace.SELF); addItemSetting(doubleOres); }