Added shapeless versions of flint & steel and sticky pistons. Sticky
pistons can be converted back into regular pistons simply by putting them in the crafting grid.
This commit is contained in:
parent
21cff3cb51
commit
ca45f2a673
@ -396,7 +396,7 @@ public class Main extends JavaPlugin
|
|||||||
shovel.setItemMeta(shovel_meta);
|
shovel.setItemMeta(shovel_meta);
|
||||||
shovel.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
|
shovel.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
|
||||||
ShapedRecipe battle_shovel = new ShapedRecipe(shovel);
|
ShapedRecipe battle_shovel = new ShapedRecipe(shovel);
|
||||||
battle_shovel.shape("-a-","-b-","-b-");
|
battle_shovel.shape("a","b","b");
|
||||||
battle_shovel.setIngredient('a', Material.LAPIS_BLOCK);
|
battle_shovel.setIngredient('a', Material.LAPIS_BLOCK);
|
||||||
battle_shovel.setIngredient('b', Material.STICK);
|
battle_shovel.setIngredient('b', Material.STICK);
|
||||||
Bukkit.addRecipe(battle_shovel);
|
Bukkit.addRecipe(battle_shovel);
|
||||||
@ -619,6 +619,20 @@ public class Main extends JavaPlugin
|
|||||||
Bukkit.addRecipe(woolRecipe);
|
Bukkit.addRecipe(woolRecipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShapelessRecipe flint_and_steel_Recipe = new ShapelessRecipe(new ItemStack(Material.FLINT_AND_STEEL));
|
||||||
|
flint_and_steel_Recipe.addIngredient(Material.FLINT);
|
||||||
|
flint_and_steel_Recipe.addIngredient(Material.IRON_INGOT);
|
||||||
|
Bukkit.addRecipe(flint_and_steel_Recipe);
|
||||||
|
|
||||||
|
ShapelessRecipe sticky_piston_Recipe = new ShapelessRecipe(new ItemStack(Material.PISTON_STICKY_BASE));
|
||||||
|
sticky_piston_Recipe.addIngredient(Material.PISTON_BASE);
|
||||||
|
sticky_piston_Recipe.addIngredient(Material.SLIME_BALL);
|
||||||
|
Bukkit.addRecipe(sticky_piston_Recipe);
|
||||||
|
|
||||||
|
ShapelessRecipe Deconv_sticky_piston_Recipe = new ShapelessRecipe(new ItemStack(Material.PISTON_BASE));
|
||||||
|
Deconv_sticky_piston_Recipe.addIngredient(Material.PISTON_STICKY_BASE);
|
||||||
|
Bukkit.addRecipe(Deconv_sticky_piston_Recipe);
|
||||||
|
|
||||||
// Add Recipes for Item cube crafting.
|
// Add Recipes for Item cube crafting.
|
||||||
ItemStack temp = new ItemStack(Material.CHEST);
|
ItemStack temp = new ItemStack(Material.CHEST);
|
||||||
ItemMeta tempmeta = temp.getItemMeta();
|
ItemMeta tempmeta = temp.getItemMeta();
|
||||||
|
@ -13099,10 +13099,10 @@ implements Listener
|
|||||||
//Bukkit.getLogger().info("Click type is "+event.getClick().toString());
|
//Bukkit.getLogger().info("Click type is "+event.getClick().toString());
|
||||||
if (isViewingEnderCube(p) && (event.getClick()==ClickType.NUMBER_KEY || ((event.getClick()==ClickType.SHIFT_LEFT || event.getClick()==ClickType.SHIFT_RIGHT) && event.getCurrentItem()!=null && event.getCurrentItem().getType()!=Material.AIR) || ((event.getClick()==ClickType.LEFT || event.getClick()==ClickType.RIGHT) && event.getRawSlot()<27 && ((event.getCursor()!=null && event.getCursor().getType()!=Material.AIR) || (event.getCurrentItem()!=null && event.getCurrentItem().getType()!=Material.AIR)))) ) {
|
if (isViewingEnderCube(p) && (event.getClick()==ClickType.NUMBER_KEY || ((event.getClick()==ClickType.SHIFT_LEFT || event.getClick()==ClickType.SHIFT_RIGHT) && event.getCurrentItem()!=null && event.getCurrentItem().getType()!=Material.AIR) || ((event.getClick()==ClickType.LEFT || event.getClick()==ClickType.RIGHT) && event.getRawSlot()<27 && ((event.getCursor()!=null && event.getCursor().getType()!=Material.AIR) || (event.getCurrentItem()!=null && event.getCurrentItem().getType()!=Material.AIR)))) ) {
|
||||||
boolean item_cube=false;
|
boolean item_cube=false;
|
||||||
Bukkit.getLogger().info("Got to 1.");
|
//Bukkit.getLogger().info("Got to 1.");
|
||||||
if (event.getClick()==ClickType.LEFT && (event.getCurrentItem().getType()==Material.CHEST || event.getCurrentItem().getType()==Material.TRAPPED_CHEST || event.getCurrentItem().getType()==Material.ENDER_CHEST)) {
|
if (event.getClick()==ClickType.LEFT && (event.getCurrentItem().getType()==Material.CHEST || event.getCurrentItem().getType()==Material.TRAPPED_CHEST || event.getCurrentItem().getType()==Material.ENDER_CHEST)) {
|
||||||
int identifier=-1;
|
int identifier=-1;
|
||||||
Bukkit.getLogger().info("Got to 2.");
|
//Bukkit.getLogger().info("Got to 2.");
|
||||||
if (event.getCurrentItem().getItemMeta().getLore()!=null) {
|
if (event.getCurrentItem().getItemMeta().getLore()!=null) {
|
||||||
//Check to see if the Lore contains anything.
|
//Check to see if the Lore contains anything.
|
||||||
for (int i=0;i<event.getCurrentItem().getItemMeta().getLore().size();i++) {
|
for (int i=0;i<event.getCurrentItem().getItemMeta().getLore().size();i++) {
|
||||||
@ -13111,14 +13111,14 @@ implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (identifier!=-1) {
|
if (identifier!=-1) {
|
||||||
Bukkit.getLogger().info("Got to 2.5.");
|
//Bukkit.getLogger().info("Got to 2.5.");
|
||||||
//This is an item cube. We will not continue.
|
//This is an item cube. We will not continue.
|
||||||
item_cube=true;
|
item_cube=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!item_cube || (item_cube && (event.getCursor()==null || event.getCursor().getType()==Material.AIR))) {
|
if (!item_cube || (item_cube && (event.getCursor()==null || event.getCursor().getType()==Material.AIR))) {
|
||||||
Bukkit.getLogger().info("Got to 3.");
|
//Bukkit.getLogger().info("Got to 3.");
|
||||||
if (this.plugin.ender_cube_active) {
|
if (this.plugin.ender_cube_active) {
|
||||||
final Player p2 = p;
|
final Player p2 = p;
|
||||||
this.plugin.ender_cube_active=false;
|
this.plugin.ender_cube_active=false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user