parent
8b5bcf15b7
commit
5bb91be679
@ -725,7 +725,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"projectID": 932060,
|
"projectID": 932060,
|
||||||
"fileID": 5976554,
|
"fileID": 5976827,
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@ import com.nomiceu.nomilabs.groovy.ShapedDummyRecipe
|
|||||||
import com.nomiceu.nomilabs.util.ItemMeta
|
import com.nomiceu.nomilabs.util.ItemMeta
|
||||||
import net.minecraft.item.ItemStack
|
import net.minecraft.item.ItemStack
|
||||||
|
|
||||||
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.JEIHelpers.addRecipeOutputTooltip
|
|
||||||
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.TranslationHelpers.translatable
|
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.TranslationHelpers.translatable
|
||||||
|
|
||||||
// Hand Framing Tool
|
// Hand Framing Tool
|
||||||
@ -35,47 +34,28 @@ items.add(tool)
|
|||||||
for (ItemStack stack : items) {
|
for (ItemStack stack : items) {
|
||||||
for (boolean trim : [true, false]) {
|
for (boolean trim : [true, false]) {
|
||||||
for (boolean front : [true, false]) {
|
for (boolean front : [true, false]) {
|
||||||
def recipeName = getRecipeName(stack, trim, front)
|
|
||||||
def recipeStack = addNBT(stack, trim, front)
|
def recipeStack = addNBT(stack, trim, front)
|
||||||
|
|
||||||
crafting.shapedBuilder()
|
crafting.shapedBuilder()
|
||||||
.name(recipeName)
|
|
||||||
.output(recipeStack)
|
.output(recipeStack)
|
||||||
.matrix(
|
.matrix('ST ', 'FI ', ' ')
|
||||||
'ST ',
|
|
||||||
'FI ',
|
|
||||||
' ')
|
|
||||||
.key('S', item("xtones:zane"))
|
.key('S', item("xtones:zane"))
|
||||||
.key('T', trim ? item("extendedcrafting:storage", 4) : IIngredient.EMPTY)
|
.key('T', trim ? item("extendedcrafting:storage", 4) : IIngredient.EMPTY)
|
||||||
.key('F', front ? item("xtones:zane", 15) : IIngredient.EMPTY)
|
.key('F', front ? item("xtones:zane", 15) : IIngredient.EMPTY)
|
||||||
.key('I', stack)
|
.key('I', stack)
|
||||||
.recipeClassFunction((output, width, height, ingredients) -> new ShapedDummyRecipe(output, ingredients, width, height, false))
|
.recipeClassFunction((output, width, height, ingredients) -> new ShapedDummyRecipe(output, ingredients, width, height, false))
|
||||||
.register()
|
.setOutputTooltip(
|
||||||
|
ItemMeta.compare(tool, recipeStack) ?
|
||||||
addRecipeOutputTooltip(recipeStack, resource(recipeName),
|
translatable("nomiceu.tooltip.labs.hand_framing.tool") :
|
||||||
ItemMeta.compare(tool, recipeStack) ?
|
translatable("nomiceu.tooltip.labs.hand_framing.drawer"),
|
||||||
translatable("nomiceu.tooltip.labs.hand_framing.tool") :
|
translatable("nomiceu.tooltip.labs.hand_framing.top_left"),
|
||||||
translatable("nomiceu.tooltip.labs.hand_framing.drawer"),
|
translatable("nomiceu.tooltip.labs.hand_framing.top_right"),
|
||||||
translatable("nomiceu.tooltip.labs.hand_framing.top_left"),
|
translatable("nomiceu.tooltip.labs.hand_framing.bottom_left")
|
||||||
translatable("nomiceu.tooltip.labs.hand_framing.top_right"),
|
).register()
|
||||||
translatable("nomiceu.tooltip.labs.hand_framing.bottom_left"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getRecipeName(ItemStack stack, boolean trim, boolean front) {
|
|
||||||
String baseName = "nomiceu:hand_framing_"
|
|
||||||
|
|
||||||
def rl = stack.getItem().getRegistryName()
|
|
||||||
if (rl != null)
|
|
||||||
baseName = baseName + rl.getNamespace() + "_" + rl.getPath()
|
|
||||||
|
|
||||||
baseName = baseName + "." + stack.getMetadata() + "_side"
|
|
||||||
if (trim) baseName = baseName + "_trim"
|
|
||||||
if (front) baseName = baseName + "_front"
|
|
||||||
return baseName
|
|
||||||
}
|
|
||||||
|
|
||||||
static ItemStack addNBT(ItemStack stack, boolean trim, boolean front) {
|
static ItemStack addNBT(ItemStack stack, boolean trim, boolean front) {
|
||||||
def sideStack = item("xtones:zane")
|
def sideStack = item("xtones:zane")
|
||||||
def trimStack = trim ? item("extendedcrafting:storage", 4) : ItemStack.EMPTY
|
def trimStack = trim ? item("extendedcrafting:storage", 4) : ItemStack.EMPTY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user