Mcresources

Latest version: v1.7.2

Safety actively analyzes 688087 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

1.5.5

Fixes

- Use '<count> <domain>:<path>' syntax for inferring 'minecraft:set_count' function when the 'name' key is explicitly included in loot tables. This fixes the case where a loot table `rm.block_loot(..., '42 modid:item')` would work as intended, however `rm.block_loot(..., {'name': '42 modid:item'})` would not

1.5.4

Changes

- Fix *another* import error in v1.5.2

1.5.3

Changes

- Fix a circular import error in v1.5.2

1.5.2

Changes

- Add `advancements` module with a few common functions for advancements.
- Add `utils.item_predicate`, used by the `minecraft:inventory_change` trigger, among others.
- Fixed `RecipeContext.with_advancement` to use the correct trigger, now uses `utils.item_predicate`
- Improve `utils.configured_placement` to handle sequences and non-pairs better.

1.5.1

Fix imports not using the fully qualified module name.

1.5.0

Due to a number of underlying changes to world generation, and some larger internal refactors with loot tables, there's a fair amount of changes in this version.

World Generation

- Added new world generation methods to `ResourceManager`: `dimension`, `dimension_type`, `noise_settings`, `processor_list`, `template_pool`, `configured_structure_feature`, `placed_feature`
- Reworked `biome` for pack version 8
- Renamed:
- `feature` -> `configured_feature`
- `carver` -> `configured_carver`
- The `world_gen` module was removed, as it's methods were largely made redundant by the move from decorators to placed features. The useful methods were moved to `utils`, such as `expand_configured` (builds a `{"type": "", "config": {}}` like structure)
- Added the `surface_rules` module, with comprehensive methods for building surface rules in a builder-like nested pattern.

Loot Tables

- Added `entity_loot` and `loot`, and redirected `block_loot` to use `loot`.
- Loot tables were tweaked: `loot` based functions now take variadic arguments, assuming each argument is a loot pool. Sequences of entries are automatically inferred as a sequence of entries in a `minecraft:alternatives` pool.
- Several loot table helper functions were made smarter, and able to discern between pools and entries, making it easier to add functions or conditions at the right logical level without relying on helper functions.
- Improved and added some more loot conditions and loot functions to the `loot_tables` module.
- As part of loot table improvements, fixed a few cases where default loot conditions (`minecraft:survives_explosion`) wasn't getting added, or getting added at the wrong level.
- In both loot tables and recipes (anywhere that accepts item stacks), counts are able to be automatically expanded into a `minecraft:set_count` function. See below note
- `utils.item_stack` (and consumers) now accepts count specifiers:
- `'namespace:path'` to indicate a item
- `'namespace:path'` to indicate a tag
- `'3 namespace:path'` to add an optional count to a item (works in loot tables and in recipes).
- `'4-6 namespace:path'` to add an optional count range to an item (works in loot tables, with the `minecraft:uniform` distribution).
- These changes work in addition to the existing tuple syntax, `(3, 'namespace:path')`, which has been expanded to be order-independent (meaning `('namespace:path', 3)` now is also accepted).

Misc

- Removed deprecated parameters in `block_model` and `item_model`
- The `tag!namespace:path` syntax is no longer supported, instead `namespace:path` should be used instead as it's more consistent with vanilla data.
- Fixed `utils.clean_generated_resources` not removing completely empty folders that it didn't visit.

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.