forked from archive/derver-plugin
change stuff
This commit is contained in:
parent
a6f4195805
commit
75b4b253df
4 changed files with 29 additions and 28 deletions
Binary file not shown.
Binary file not shown.
|
@ -36,42 +36,34 @@ public class Handler implements Listener {
|
||||||
|
|
||||||
if (b.getType() == Material.STONE) {
|
if (b.getType() == Material.STONE) {
|
||||||
b.setType(Material.LAVA);
|
b.setType(Material.LAVA);
|
||||||
} else if (b.getType() == Material.COBBLESTONE) {
|
} else if (b.getType() == Material.COBBLESTONE || b.getType() == Material.GRAVEL) {
|
||||||
Material[] items = {
|
Material[] items = {
|
||||||
|
Material.ICE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.COAL_ORE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.COAL_ORE,
|
||||||
|
Material.COPPER_ORE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.COAL_ORE,
|
||||||
|
Material.ICE,
|
||||||
|
Material.ICE,
|
||||||
Material.COAL_ORE,
|
Material.COAL_ORE,
|
||||||
Material.COPPER_ORE,
|
Material.COPPER_ORE,
|
||||||
Material.IRON_ORE,
|
Material.IRON_ORE,
|
||||||
Material.GOLD_ORE
|
Material.GOLD_ORE,
|
||||||
};
|
Material.EMERALD_ORE,
|
||||||
|
Material.LAPIS_ORE,
|
||||||
b.setType(Material.AIR);
|
Material.REDSTONE_ORE,
|
||||||
if (new Random().nextInt(8) != 0) continue;
|
Material.ANCIENT_DEBRIS,
|
||||||
b.getWorld().dropItem(loc, new ItemStack(items[new Random().nextInt(items.length)]));
|
Material.NETHER_QUARTZ_ORE,
|
||||||
} else if (b.getType() == Material.GRAVEL) {
|
|
||||||
b.setType(Material.AIR);
|
|
||||||
if (new Random().nextInt(8) != 0) continue;
|
|
||||||
b.getWorld().dropItem(loc, new ItemStack(Material.NETHER_QUARTZ_ORE));
|
|
||||||
} else if (b.getType() == Material.COAL_ORE) {
|
|
||||||
Material[] items = {
|
|
||||||
Material.GRASS_BLOCK,
|
|
||||||
Material.GRASS_BLOCK,
|
|
||||||
Material.GRASS_BLOCK,
|
|
||||||
Material.DIAMOND_ORE
|
Material.DIAMOND_ORE
|
||||||
};
|
};
|
||||||
|
|
||||||
b.setType(Material.AIR);
|
b.setType(Material.AIR);
|
||||||
if (new Random().nextInt(8) != 0) continue;
|
if (new Random().nextInt(4) != 0) continue;
|
||||||
b.getWorld().dropItem(loc, new ItemStack(items[new Random().nextInt(items.length)]));
|
|
||||||
} else if (b.getType() == Material.NETHER_QUARTZ_ORE) {
|
|
||||||
Material[] items = {
|
|
||||||
Material.EMERALD_ORE,
|
|
||||||
Material.LAPIS_ORE,
|
|
||||||
Material.REDSTONE_ORE,
|
|
||||||
Material.ANCIENT_DEBRIS
|
|
||||||
};
|
|
||||||
|
|
||||||
b.setType(Material.AIR);
|
|
||||||
if (new Random().nextInt(8) != 0) continue;
|
|
||||||
b.getWorld().dropItem(loc, new ItemStack(items[new Random().nextInt(items.length)]));
|
b.getWorld().dropItem(loc, new ItemStack(items[new Random().nextInt(items.length)]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,15 @@ public class Main extends JavaPlugin {
|
||||||
|
|
||||||
getServer().addRecipe(recipe);
|
getServer().addRecipe(recipe);
|
||||||
|
|
||||||
|
key = new NamespacedKey(this, "BoneDirt");
|
||||||
|
item = new ItemStack(Material.GRASS_BLOCK,1);
|
||||||
|
|
||||||
|
recipe = new ShapedRecipe(key, item);
|
||||||
|
recipe.shape("AAA", "ABA", "ACA");
|
||||||
|
recipe.setIngredient('A', Material.GRAVEL);
|
||||||
|
recipe.setIngredient('B', Material.BONE_MEAL);
|
||||||
|
recipe.setIngredient('C', Material.COAL);
|
||||||
|
|
||||||
key = new NamespacedKey(this, "StoneStick");
|
key = new NamespacedKey(this, "StoneStick");
|
||||||
item = new ItemStack(Material.STICK,4);
|
item = new ItemStack(Material.STICK,4);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue