Skip to content

Fetchr 5.1.4 Beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@NeunEinser NeunEinser released this 16 Oct 21:02
· 16 commits to develop since this release
d2c2180

5.1.4 will be a feature-wise small release which updates the game to 1.21 with
some technical improvements taking advantage of new Minecraft features, and of
course new items.

Changelog

  • The targeted Minecraft version is now 1.21-1.21.2-pre5
  • Added new items and changed categories of existing items
  • Technical Improvements and better Performance
  • Removed machinery as command blocks are no longer neccesary
  • Updated translations from Crowdin

Item Changes

Roots

New category "Roots" with:

  • Carrot
  • Golden Carrot
  • Carrot on a Stick
  • Baked Potato

Armadillo

New "Armadillo" Category with:

  • Armadillo Scute
  • Wolf Armor

Other new items

  • Jungle Sapling as part of the jungle category
  • White Stained Glass exclusive with glass bottle and orange concrete
  • Brown Banner as part of the wool category
  • Light Blue Bundle as part of the leather category
    • This is only active in 1.21.2 (or specifically in any version greater than or equal 24w39a). Earlier versions will not use this item

Changes

  • Book items have been separated from the leather category and are no longer
    exclusive with item frames
  • Tnt and Tnt Minecart are no longer exclusive with glass bottle and orange
    concrete
  • Saplings are no longer mutually exclusive
    • Mangrove propagule is exclusive with mud items
    • spruce sapling is exclusive with sweet berries, fern and snow
    • acacial is exclusive with cactus green, lime dye and sea pickle
    • dark oak is exclusive with apple and golden apple

Removed Items

  • Birch sapling
  • Golden hoe, golden pickaxe
  • Diamond shovel, diamod axe, diamond sword

The variety in gold and diamond tools was reduced to make blind runs need to craft fewer of them.

Technical Changess

  • Overhauled item registration card generation and item detecion with new
    Minecraft Features in Mind such as Macros

Item Registration

Item registration has been overhauled and existing forks that change the item
pool will need to update to the new system.

  • textComponent has been removed
  • clearCommand has been removed
  • detectCommand has been removed
  • icon is no longer a text component and instead the 4 digit hex code of the
    unicode character representing the item on the HUD bingo card
  • icon_font specifies a own custom font to use for this item. Can be used to
    avoid conflicts in the vanilla fetchr font files when maintaining forks
    • actionbar A list of 5 font definitions to use for the card displayed in
      the actionbar. Each definition is for a different row on the Bingo card
      and needs to have the corresponding ascend value set. Reference the vanilla
      Fetchr assets.
  • translation New property for the translation key of the item
  • item_tests Optional. Can be used for custom item tests.
    • type see blow
    • Type specific fields (see below)

Item Tests

Item tests can be used to further specify an item or override default behavior.
By default, any item in the item field will match, including any defined
components.

If item_tests is specified the components of the item definition will be
ignored for testing purposes and only be used to construct a display item
for the item frame card or the category chests.

  • fetchr:component
    A component the item must have exactly like specified.
    • id The data component id
    • component The component value
  • fetchr:negated_component
    A component the item must not have
    • id The data compontent id
  • fetchr:predicate
    An item sub predicate that must succeed for the item
    • id The item sub predicate type
    • predicate The predicate data

At runtime, this will be parsed together with the item id into a command item
argument.

For example this definition would leather boots with a blue shaper trim which is
not shown in the tooltup and a custom lore text whenever it is displayed, and
any leather boots that have any kind of blue trim would match:

{
	item: {
		id: "minecraft:leather_boots",
		components: {
			"minecraft:trim": {
				pattern: "minecraft:shaper",
				material: "minecraft:lapis",
				show_in_tooltip: false
			},
			"minecraft:lore": [
				'{"translate": "item.minecraft.smithing_template.upgrade", "color": "gray", "italic": false}',
				'[" ", {"translate": "fetchr.item.description.any_trim", "color": "#406d95", "italic": false}]',
				'[" ", {"translate": "trim_material.minecraft.lapis", "color": "#406d95", "italic": false}]'
			]
		}
	},
	item_tests: [
		{
			type: "fetchr:predicate",
			id: "minecraft:trim",
			predicate: {material: "minecraft:lapis" }
		}
	]
}

When testing the item id together with the specified item tests would check for
minecraft:leather_boots["minecraft:trim"~{material:"minecraft:lapis"}]

Item Detection & Performance

The machinery room is obsolete now and has been removed. Item detection has
been fully implemented using macros and no longer needs any command blocks.

This should improve the performance quite significantly, as running command
blocks every tick was quite expensive.

Item detection now only runs for a player who had a change to their inventory
and does not have any active checks that run every tick anymore.

Command blocks are also more expensive because they parse their command
everytime they are executed anew while functions are pre-parsed. Macro lines
still may need to be parsed more often, but because of macro caching, they will
only need to be re-parsed when a new card with different items is generated.
The cache only caches up to 8 unique combinations of arguments per function file
which means some functions have been duplicated to take advantage of the cache
for 25 items. There will still be a small performance overhead for cache lookup.

Card Generation

Card generation also could be simplified using macros. Furthermore, there is no
custom random number generator in place anymore, and instead the built-in
random command is used.

Bug Fix

  • Fixed Green Dye having the wrong internal id of fetchr:lime_dye (#236)