Skip to content

Instantly share code, notes, and snippets.

@josemoncab
Created October 26, 2023 10:02
Show Gist options
  • Save josemoncab/32191389a549edb7ddf7fdc70a6c9397 to your computer and use it in GitHub Desktop.
Save josemoncab/32191389a549edb7ddf7fdc70a6c9397 to your computer and use it in GitHub Desktop.
Recipes class
public class Recipes {
static class Blasting extends BlastingRecipe {
protected Blasting() {
super("minecraft:sticks",
"sticks",
ItemStack.of(Material.STICK),
0.5f,
20);
}
@Override
public void setIngredient(DeclareRecipesPacket.@NotNull Ingredient ingredient) {
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Campfire extends CampfireCookingRecipe {
protected Campfire() {
super("minecraft:sticks",
"sticks",
ItemStack.of(Material.STICK),
0.5f,
20);
}
@Override
public void setIngredient(DeclareRecipesPacket.@NotNull Ingredient ingredient) {
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Shaped extends ShapedRecipe {
protected Shaped() {
super("minecraft:sticks",
1,
1,
"sticks",
List.of(new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)))),
ItemStack.of(Material.STICK));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Shapeless extends ShapelessRecipe {
protected Shapeless() {
super("minecraft:sticks",
"sticks",
List.of(new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)))),
ItemStack.of(Material.STICK));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Smelting extends SmeltingRecipe {
protected Smelting() {
super("minecraft:sticks",
"sticks",
ItemStack.of(Material.STICK),
0.5f,
20);
}
@Override
public void setIngredient(DeclareRecipesPacket.@NotNull Ingredient ingredient) {
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Smithing extends SmithingRecipe {
protected Smithing() {
super("minecraft:sticks",
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.DIAMOND_AXE))),
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.NETHERITE_INGOT))),
ItemStack.of(Material.NETHERITE_AXE));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Smoking extends SmokingRecipe {
protected Smoking() {
super("minecraft:sticks",
"sticks",
ItemStack.of(Material.STICK),
0.5f,
20);
}
@Override
public void setIngredient(DeclareRecipesPacket.@NotNull Ingredient ingredient) {
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE)));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
static class Stonecutter extends StonecutterRecipe {
protected Stonecutter() {
super("minecraft:sticks",
"sticks",
new DeclareRecipesPacket.Ingredient(List.of(ItemStack.of(Material.STONE))),
ItemStack.of(Material.STICK));
}
@Override
public boolean shouldShow(@NotNull Player player) {
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment