change stuff

This commit is contained in:
biglyderv 2024-11-17 18:10:17 -05:00
parent a6f4195805
commit 75b4b253df
4 changed files with 29 additions and 28 deletions

View file

@ -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)]));
} }
} }

View file

@ -37,6 +37,15 @@ public class Main extends JavaPlugin {
recipe.setIngredient('B', Material.STICK); recipe.setIngredient('B', Material.STICK);
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);