This commit is contained in:
biglyderv 2024-11-17 23:01:12 -05:00
parent 002518cb84
commit e4db9a30b2
2 changed files with 15 additions and 2 deletions

View file

@ -10,6 +10,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.generator.BiomeProvider; import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.RecipeChoice;
import org.bukkit.inventory.ShapedRecipe; import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -45,7 +46,7 @@ public class Main extends JavaPlugin {
recipe.shape("AAA", "ABA", "ACA"); recipe.shape("AAA", "ABA", "ACA");
recipe.setIngredient('A', Material.GRAVEL); recipe.setIngredient('A', Material.GRAVEL);
recipe.setIngredient('B', Material.BONE_MEAL); recipe.setIngredient('B', Material.BONE_MEAL);
recipe.setIngredient('C', Material.COAL); recipe.setIngredient('C', new RecipeChoice.MaterialChoice(Material.COAL,Material.CHARCOAL));
getServer().addRecipe(recipe); getServer().addRecipe(recipe);
@ -64,10 +65,22 @@ public class Main extends JavaPlugin {
recipe = new ShapedRecipe(key, item); recipe = new ShapedRecipe(key, item);
recipe.shape("AAA", "ABA", "AAA"); recipe.shape("AAA", "ABA", "AAA");
recipe.setIngredient('A', Material.BONE_MEAL); recipe.setIngredient('A', Material.BONE_MEAL);
recipe.setIngredient('B', Material.GRASS_BLOCK); recipe.setIngredient('B', Material.DIRT);
getServer().addRecipe(recipe); getServer().addRecipe(recipe);
key = new NamespacedKey(this, "CoarseishDirt");
item = new ItemStack(Material.COARSE_DIRT,2);
recipe = new ShapedRecipe(key, item);
recipe.shape("AB ", " ", " ");
recipe.setIngredient('A', Material.GRAVEL);
recipe.setIngredient('B', Material.DIRT);
getServer().addRecipe(recipe);
key = new NamespacedKey(this, "StoneTable"); key = new NamespacedKey(this, "StoneTable");
item = new ItemStack(Material.CRAFTING_TABLE); item = new ItemStack(Material.CRAFTING_TABLE);