Growthcraft Community Edition

Growthcraft Community Edition

1M Downloads

[Feature request] Advancements

Deshiba opened this issue ยท 5 comments

commented

It'd be lovely to have some advancements to this mod. Not only for a sense of completion but a guide on how to do certain stuff in sequence in order to get a complete product.

commented

This code should suffice for the GrowthCraft Fishtrap json, unless I overlooked something. Please provide feedback.

{
	"display": {
		"icon": {
			"item": "growthcraft_fishtrap:fishtrap"
		},
		"title": "Trapping Fish"
		"frame": "task"
	},
	"criteria": {
		"fishtrap": {
			"trigger": "minecraft:inventory_changed",
			"conditions": {
				"items: [
					"item": "growthcraft_fishtrap:fishtrap"
				]
			}
		}
	}
}
commented

This one works:

{
	"display": {
		"icon": {
			"item": "growthcraft_fishtrap:fishtrap"
		},
    	"title": {
      		"translate": "advancement.craft.fishtrap"
    	},
    	"description": {
      		"translate": "advancement.craft.fishtrap.desc",
      		"italic": true
    	},
		"frame": "task",
		"background": "minecraft:textures/blocks/planks_spruce.png"
	},
	"criteria": {
		"craft_fishtrap": {
			"trigger": "minecraft:inventory_changed",
			"conditions": {
				"items": [
					{
						"item": "growthcraft_fishtrap:fishtrap"
					}
				]
			}
		}
	}
}

With the language entries:

advancement.craft.fishtrap=Trapping fish
advancement.craft.fishtrap.desc=Get yourself a Fish Trap.

The criteria "fishtrap" has been renamed to "craft_fishtrap" to make it less generic and avoid further naming conflicts.

About the "background" property I don't know whether it is only a root advancement property or not. It is left out for many vanilla advancements. But if it is missing here, the game crashes when opening the advancements window. I suggest to test things out as I'm very new to this system ... Or Alatyami may help.

commented

Open issues:

  • Growthcraft_apples is the only mod that has a booze not requiring cellar. The booze advancements will need to only be there when cellar is installed.
  • Targeting specific items like the forge buckets and booze with the 'Damage' nbt tag. growthcraft_apples:applecider with a damage of 0 and a damage of 1 are apple juice and apple cider respectively.
  • Getting a texture for advancements like the apple cider. The issue here is that both the bottle and the bucket icons are generated, I do not know how to target these.
commented

A list of all the item names, these could/should be used for the advancements.
growthcraft items.txt

Todo:

  • growthcraft advancements
  • growthcraft_apples advancements
  • growthcraft_bamboo advancements
  • growthcraft_bees advancements
  • growthcraft_cellar advancements
  • growthcraft_fishtrap advancements
  • growthcraft_grapes advancements
  • growthcraft_hops advancements
  • growthcraft_milk advancements
  • growthcraft_rice advancements