Skip to content

Commit

Permalink
improv: more recipe datagen, fix effect desc
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Mar 15, 2024
1 parent f978595 commit 819dae8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void addTrim(String key, String name) {
}

public void addEffectDesc(Supplier<? extends MobEffect> key, String name) {
this.add("effect." + this.id + "." + key.get().getDescriptionId() + ".description", name);
this.add(key.get().getDescriptionId() + ".description", name);
}

public void addDimension(ResourceKey<Level> dimension, String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,47 @@ protected ShapedRecipeBuilder makeGlovesWithBlock(Supplier<? extends Item> glove
.unlockedBy(getHasName(material.get()), has(material.get()));
}

protected ShapedRecipeBuilder makeHelmetWithTag(Supplier<? extends Item> helmet, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, helmet.get())
.define('#', materialTag)
.pattern("###")
.pattern("# #")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeChestplateWithTag(Supplier<? extends Item> chestplate, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, chestplate.get())
.define('#', materialTag)
.pattern("# #")
.pattern("###")
.pattern("###")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeLeggingsWithTag(Supplier<? extends Item> leggings, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, leggings.get())
.define('#', materialTag)
.pattern("###")
.pattern("# #")
.pattern("# #")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeBootsWithTag(Supplier<? extends Item> boots, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, boots.get())
.define('#', materialTag)
.pattern("# #")
.pattern("# #")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeGlovesWithTag(Supplier<? extends Item> gloves, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, gloves.get())
.define('#', materialTag)
.pattern("# #")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeHelmet(Supplier<? extends Item> helmet, Supplier<? extends Item> material) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, helmet.get())
.define('#', material.get())
Expand Down Expand Up @@ -290,13 +331,6 @@ protected ShapedRecipeBuilder makeGloves(Supplier<? extends Item> gloves, Suppli
.unlockedBy(getHasName(material.get()), has(material.get()));
}

protected ShapedRecipeBuilder makeGlovesWithTag(Supplier<? extends Item> gloves, TagKey<Item> materialTag, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, gloves.get())
.define('#', materialTag)
.pattern("# #")
.unlockedBy("has_" + unlockName, has(materialTag));
}

protected ShapedRecipeBuilder makeRing(Supplier<? extends Item> ring, Item material) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, ring.get())
.define('#', material)
Expand All @@ -316,6 +350,25 @@ protected ShapedRecipeBuilder makePendant(Supplier<? extends Item> pendant, Item
.unlockedBy(getHasName(material), has(material));
}

protected ShapedRecipeBuilder makeRingWithTag(Supplier<? extends Item> ring, Item material, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, ring.get())
.define('#', material)
.pattern(" # ")
.pattern("# #")
.pattern(" # ")
.unlockedBy("has_" + unlockName, has(material));
}

protected ShapedRecipeBuilder makePendantWithTag(Supplier<? extends Item> pendant, TagKey<Item> material, Ingredient string, String unlockName) {
return ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, pendant.get())
.define('S', string)
.define('#', material)
.pattern("SSS")
.pattern("S S")
.pattern(" # ")
.unlockedBy("has_" + unlockName, has(material));
}

protected SimpleCookingRecipeBuilder smeltingOreRecipe(ItemLike result, ItemLike ingredient, float experience) {
return SimpleCookingRecipeBuilder.smelting(Ingredient.of(ingredient), RecipeCategory.MISC, result, experience, 200)
.unlockedBy(getHasName(ingredient), has(ingredient));
Expand Down

0 comments on commit 819dae8

Please sign in to comment.