Divine Journey 2

Divine Journey 2

636k Downloads

Chicken Wing Ring is uncraftable

KleinGrrmpf opened this issue ยท 1 comments

commented

Modpack version:
Beta-0.1

Description:
The Chicken Wing Ring is not craftable

Steps to reproduce:

  1. Spawn a bat
  2. Catch it with a golden Lasso
  3. Give yourself the other needed items
  4. Arrange them correctly in a crafting grid

Expected behavior:
You should be able to craft it.

Screenshots:
grafik
This is the lasso in the grid:
grafik
This is the lasso needed:
grafik

Yes, those are the correct enchanted books.

Additional context:
The issue is cause by the recipe asking for a lasso with a bat with 0.0/0.0 health. That's why using a lasso with a caught bat doesn't work since it has health. If you cheat yourself the lasso that the recipe asks for (bookmark the lasso from the recipe and then cheat it with JEI cheat mode), the ring is craftable. If you try to release that bat from the cheated lasso it says that the mob is dead and therefore cannot be released.
What would probably fix it is deleting the health NBT from the lasso in the script. Or, alternatively, if you want the player to use a full-health bat, specify the health. The latter will more likely work, though I am not very experienced with scripting. But in my experience with minecraft, not specifying a value allows it to be any value and still work.

commented

Fixed, now the recipes can take any Chicken / Squid.

The issue wasn't actually the Health amount, Extra Utilities simply shows the health of the captured mob, and if it isn't specified, it defaults to 0.

The issue was the following:

  • The NBT I specified was:
    {Animal: {id: "minecraft:chicken"}, No_Place: 1 as byte}

  • While a captured Chicken NBT generally looks something like this:

{
	Animal: {
		IsChickenJockey: 0 as byte,
		HurtByTimestamp: 0,
		ForgeData: {},
		RelativeAABB: [-0.20000000298023224, 0.0, -0.20000000298023224, 0.20000000298023224, 0.699999988079071, 0.20000000298023224],
		Attributes: [{
			Base: -2.0,
			Name: "tc.mobmod"
		}, {
			Base: 0.0,
			Name: "tc.mobmodtaint"
		}, {
			Base: 4.0,
			Name: "generic.maxHealth"
		}, {
			Base: 0.0,
			Name: "generic.knockbackResistance"
		}, {
			Base: 0.25,
			Name: "generic.movementSpeed"
		}, {
			Base: 0.0,
			Name: "generic.armor"
		}, {
			Base: 0.0,
			Name: "generic.armorToughness"
		}, {
			Base: 1.0,
			Name: "forge.swimSpeed"
		}, {
			Base: 16.0,
			Modifiers: [{
				UUIDMost: -137076502981426230 as long,
				UUIDLeast: -6355924917969838276 as long,
				Amount: -0.02739233513734765,
				Operation: 1,
				Name: "Random spawn bonus"
			}],
			Name: "generic.followRange"
		}],
		Invulnerable: 0 as byte,
		FallFlying: 0 as byte,
		ForcedAge: 0,
		PortalCooldown: 0,
		AbsorptionAmount: 0.0 as float,
		FallDistance: 0.0 as float,
		InLove: 0,
		DeathTime: 0 as short,
		ForgeCaps: {
			"llibrary:extendedentitydatacapability": {},
			"enderutilities:entity_portal_cooldown": {
				LastInPortal: 0 as long
			},
			"twilightforest:cap_shield": {
				permshields: 0,
				tempshields: 0
			},
			"roots:life_essence_capability": {
				cooldown: 0 as long
			},
			"thaumicaugmentation:portal_state": {
				inPortal: 0 as byte
			}
		},
		HandDropChances: [0.085 as float, 0.085 as float],
		PersistenceRequired: 0 as byte,
		id: "minecraft:chicken",
		Age: 0,
		Motion: [0.0, -0.0784000015258789, 0.0],
		Leashed: 0 as byte,
		UUIDLeast: -5270959175975491602 as long,
		Health: 4.0 as float,
		LeftHanded: 0 as byte,
		Air: 300 as short,
		OnGround: 1 as byte,
		Dimension: 0,
		Rotation: [61.789253 as float, 0.0 as float],
		UpdateBlocked: 0 as byte,
		HandItems: [{}, {}],
		ArmorDropChances: [0.085 as float, 0.085 as float, 0.085 as float, 0.085 as float],
		EggLayTime: 6283,
		UUIDMost: 7221777811750668823 as long,
		Pos: [-271.5, 62.0, 353.5],
		Fire: -1 as short,
		ArmorItems: [{}, {}, {}, {}],
		CanPickUpLoot: 0 as byte,
		HurtTime: 0 as short
	},
	Animal_Metadata: {
		Health: 4.0 as float,
		MaxHealth: 4.0 as float
	},
	No_Place: 0 as byte
}

Now it wouldn't be an issue that the second one is way longer, as any NBT value not specified in ZenScript can be filled with ANY value in the crafting table.

The issue was the I specified that the Chicken hasn't yet been placed with No_Place: 1 as byte at the end, while this value is usually No_Place: 0 as byte. By deleting this from the required NBT, now any NBT is accepted, so the new recipe is:

recipes.addShaped(<extrautils2:chickenring>,
[[<contenttweaker:condensed_vis_crystal_volatus>,<extrautils2:goldenlasso>.withTag({Animal: {id: "minecraft:chicken"}}),<contenttweaker:condensed_vis_crystal_volatus>],
[<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 4 as short, id: 2 as short}]}),<thaumcraft:baubles:5>,<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 4 as short, id: 2 as short}]})],
[null,<thaumcraft:mirrored_glass>,null]]);

Same goes for the Ring of the Flying Squid recipe.