Jump to content

Recommended Posts

Posted

I'm trying to fix my weapon content mod for 1.22.3, and the issue I'm having is that the tempering and quenching buffs apply to the tool head, but when you go and make the tool, it doesn't transfer. This is my code:

Spoiler
[
	{
		ingredientPattern: "T	S",
		ingredients: {
			"T": { type: "item", code: "examplehead-example-*", name: "metal", allowedVariants: ["copper", "tinbronze", "bismuthbronze", "blackbronze", "iron", "meteoriciron", "steel"]  },
			"S": { type: "item", code: "game:stick" }
		},
		width: 1,
		height: 2,
		output: { type: "item", code: "example-{metal}", quantity: 1, recipeAttributes: { "applyquenchablebuffs": true  }  }
	},
	{
		ingredientPattern: "T,P,S",
		ingredients: {
			"T": { type: "item", code: "examplehead-example-steel" },
			"S": { type: "item", code: "game:stick" },
			"P": { type: "item", code: "game:metalplate-gold", quantity: 1 },
		},
		width: 1,
		height: 3,
		output: { type: "item", code: "example-gold", quantity: 1, recipeAttributes: { "applyquenchablebuffs": true  }  }
	},	
	{
		ingredientPattern: "T,P,S",
		ingredients: {
			"T": { type: "item", code: "examplehead-example-steel" },
			"S": { type: "item", code: "game:stick" },
			"P": { type: "item", code: "game:metalplate-silver", quantity: 1 },
		},
		width: 1,
		height: 3,
		output: { type: "item", code: "example-silver", quantity: 1, recipeAttributes: { "applyquenchablebuffs": true  }  }
	}
]

 

I've tried adding the copyAttributeFrom: "T" attribute to the recipes already, and it did not work. The strange thing is that I remember my other mod that used a base-game toolhead in the recipe had quenching work, so I dunno now. Here's the toolhead code just in case:

Spoiler
{
	code: "examplehead",
	variantgroups: [
		{ code: "type", states: [ "example" ] },
		{ code: "metal", states: ["copper", "tinbronze", "bismuthbronze", "blackbronze", "iron", "meteoriciron", "steel" ] }
	],
	heldTpUseAnimation: "interactstatic", maxstacksize: 4,
	shapeByType: {
		"examplehead-example-*": { base: "game:item/tool/blade/example" },
	},
	texturesByType: {
		"examplehead-example-*": {
			"handle": { base: "game:block/transparent" },
			"blackbronze": { base: "game:block/metal/ingot/{metal}" }
		}
	},
	behaviorsByType: {
        "@(.*-steel|.*-meteoriciron|.*-iron)": [
            { name: "Quenchable" },
            { name: "GroundStorable", properties: { layout: 'SingleCenter', collisionBox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.125, z2: 1 } } }
        ],
		"*": [
			{ name: "GroundStorable", properties: { layout: 'SingleCenter', collisionBox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.125, z2: 1 } } }
		]
	},
	attributes: {
		forgable: true,
		onTongTransform: {
			translation: { x: -1, y: -0.5, z: 0.16 },
			rotation: { x: 114, y: 111, z: -4 }
		},
		inForgeTransform: {
			translation: { x: -0.2, y: -0.085, z: 0.2 },
			rotation: { x: 0, y: 62, z: 0 },
			origin: { x: 0.7, y: 0.5, z: 0.5 },
			scale: 0.9
		},
		onMetalTongTransform: {
     		translation: { x: -0.99, y: -0.125, z: -0.1 },
    		rotation: { x: 0, y: -90, z: 0 },
      		origin: { x: 0.5, y: 0, z: 0.5 }
		},
		groundStorageTransform: {
			translation: { x: -0.45, y: 0.02, z: 0.45 },
			rotation: { x: 0, y: 45, z: 0 }
		}
	},
	creativeinventory: { "general": ["*"], "items": ["*"] },
	guiTransform: {
		translation: { x: 0, y: 0, z: 0 },
		rotation: { x: -89, y: 47, z: 34 },
		origin: { x: 1.1, y: 0, z: 0.47 },
		scale: 2
	},
	fpHandTransform: {
		translation: { x: -0.2, y: -0.3, z: 0.4 },
		rotation: { x: -59, y: 15, z: 90 },
		scale: 2.84
	},
	groundTransform: {
		translation: { x: 0, y: 0, z: 0 },
		rotation: { x: 0, y: 0, z: 0 },
		origin: { x: 0.5, y: 0, z: 0.5 },
		scale: 3.4
	},
	tpHandTransform: {
		translation: { x: -0.2, y: 0.35, z: -0.325 },
		rotation: { x: -90, y: 0, z: 0 },
		origin: { x: 0.35, y: 0, z: 0.18 },
		scale: 0.6
	}
}

I dunno what to do now. Is this a base-game bug/hardcoded thing and is unfixable? Thanks!

  • Solution
Posted (edited)
On 5/13/2026 at 2:52 PM, PineReseen said:

[...] the tempering and quenching buffs apply to the tool head, but when you go and make the tool, it doesn't transfer.

Does the resulting tool have a Buffable behavior? If not, then you need to add it for the buffs to apply.

Edited by MKMoose
  • Thanks 1
Posted
3 hours ago, MKMoose said:

Does the resulting tool have a Buffable behavior? If not, then you need to add it for the buffs to apply.

Thank you! This worked, I dunno how I missed that...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.