Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zauber Cauldrons 1.20 Feature Update (Spreading the Magic Update) #885

Merged
merged 69 commits into from
Jan 14, 2024

Conversation

Bloo-dev
Copy link
Member

@Bloo-dev Bloo-dev commented Jun 12, 2023

With 1.20 Zauber Cauldrons is receiving another feature update, aiming to tie up some loose ends in the magic system.

Progress Overview

  • Make Splash and Lingering Soulutions Functional
  • Enable re-texturing of Zauber Cauldrons via the RP
  • Use Beet templates to reduce repetitive code
  • Update Particle Effect Colors (1.20 potion color changes)
  • Add support for custom liquids via expansions
  • Allow custom liquids to display their own particles
  • Implement 'Biome Painter' Potions and Soulutions
  • Rebalance Wandering Trader Deals
  • Performance Enhancements
  • Update to 1.20.4
  • Make Crystals unstackable (depends on Allow lib_player_heads to Create Unstackable Player Heads #937 )

Feature Outline

Below is a list of features to be introduced with this update.

Splash and Lingering Soulutions

Soulutions are now available for all supported potion types as splash and lingering variants! Simply use soul fire to heat a powered-snow filled Zauber Cauldron and craft a Soulution as usual. The resultung splash or lingering Soulution will drop a copy of the Soulution item when thrown -- but with one 'Sip' (in this case called 'Throw') less.
The copy will spawn at the location of impact of the thrown potion. Dispensers are supported.
image

Splash and Lingering Soulutions from previous versions of Zauber Cauldrons already have all the required data, and will function as expected in this newer version (apart from a lore line being missing on these outdated items).

Crystals

Zauber Crystals have gotten a minor revision in this update, which not only updated the textures to match the new potion colors, but also makes them less annoying to use:

  • Crystals are no longer stackable
  • Crystals can no longer be placed down from the offhand

The latter is achieved by turning them into firework star items when in the offhand. This is completely invisible to resource pack users. Old crystals in existing worlds will remain stackable and keep their old textures.

Magic in a Bottle

Magic in a bottle gains a new property: The preferred Moon phase. Possessed items created by a Zauber Cauldron now prefer one out of the 8 Moon phases and are calmed by this moon phase. Magic in a Bottle doesn't burst as quickly during this Moon phase and bottling of Magico (see below) is possible.
The preferred Moon phase weakly depends on the coordinates of the Zauber Cauldron in which the Magic in a Bottle was made as well as the world seed.
Players wearing a full set of Zauber Armor will see sparkle particles on Magic in a Bottle and Magicol during this moon phase.
sparkling_magic_in_a_bottle

Wandering Trader Deals

The trades added to Wandering Traders by Zauber Cauldrons have been overhauled. Previously all trades were rather overpriced and therefore generally uninteresting. The new trades have prices set depending on the item sold (enchanted prismarine shard, golden apple, or prismarine crystals) and the sell quantities have been adjusted in the player's favor.
image
Here's a quick overview of the new trade pool layout:

  • there is a single trade pool called gm4_zauber_cauldrons:precursors
  • the pool contents vary based on chance:
    • there is a 33% chance of Enchanted Prismarine Shards in the pool, with a 12.5% for a count of 3 instead of 1
    • there is a 50% chance of a Golden Apple in the pool
    • there is a 40% chance of 8 to 24 Prismarine Crystals in the pool

From the selected pool members, one trade is then selected to be presented by the Wandering Trader.

Magicol

Magicol is a new liquid which can be created within a Zauber Cauldron. To craft Magicol first fill up the Zauber Cauldron with water. All water levels work, but for maximum efficiency filling it up to the brim is recommended. Now add an Enchanted Prismarine Shard, Magic in a Bottle, and some dye.
image
Once the recipe completes the water in the Zauber Cauldron will now be replaced with Magicol.
Magicol itself has no uses, it can simply remain in the Zauber Cauldron until it is bottled, however, this bottling process can only be executed during the preferred Moon phase of the Magic in a Bottle used to craft the Magicol.

If you wish to disable the entire Magicol system you can set $disable_magicol in gm4_zc_data to 1. This will disable all Magicol related crafting recipes. It wil not disable the functionality of those items though.

Bottled Magicol

Bottled Magicol is a magical liquid which can dye biomes. To obtain it one must be familiar with Zauber Cauldron's mechanics and explore some of its magic branches, or I better say it is recommended to do so, yet technically Bottled Magicol can be made without any advanced gear or knowledge.

First the Zauber Cauldron must be filled with Magicol, see the section above for details. Once this is done the Magicol can be bottled, however, this must be done during the Moon phase preferred by the Magic in a Bottle used to make the Magicol.
To figure this Moon phase out two methods may be used:

  • trial & error: During their preferred Moon phase Possessed Items don't break out of Magic in a Bottle as quickly. Trying this experiment for 8 nights will reveal the right phase
  • using Zauber Armor: When wearing Zauber Armor sparkles will appear around Magic in a Bottle and Zauber Cauldrons filled with Magicol during the preferred Moon phase

Once this knowledge has been obtained for a Cauldron once the player can simply look at the Moon and does not have to do this research again.
To obtain Bottled Magicol throw the following into a Zauber Cauldron filled with Magicol:

  • a Slime Ball, Magma Cream, or a Snowball
  • a drinkable, splash, or lingering water bottle
  • Prismarine Crystals

When using a slime ball, the resulting Bottled Magicol will be temperate, with Magma Cream it will be arid, and with a Snowball it will be polar. The different types of bottles do the obvious. Here is an overview of all the parameters:

  • The Bottled Magicol obtained via this process will take the color of the Magicol liquid previously in the cauldron.
  • If a lingering water bottle was used the resulting Bottled Magicol will cause permanent particle effects in the air of the biome it creates, a splash bottle does not do this. Drinkable Bottled Magicol is currently useless.
  • Temperate Bottled Magicol allows for rain, Polar Bottled Magicol allows for snow, and Arid Bottled Magicol forces clear skies in the biome it creates. Additionally, the base color is slightly shifted for these three variants
  • All of these biomes are spawn-proof
  • Using Soul Fire Bottled Magicol Soulutions can be made.
    image

Bottled Magicol causes tall grass (called short grass in 1.20.4) to spawn around the impact location. If the flower corrosponding to the biome that was painted in is considered lucky, it will also cause that flower to spawn and grant luck to nearby players for a short amount of time.

Technical Features

Below is a list of features which do not directly affect gameplay but may interest the more technically inclined.

Loot Tables

Most items in Zauber Cauldrons are now available via loot tables located in the standard items/ directory. Do note that some of these items have special versions which are not available in loot tables (mainly soulutions).

Custom Liquid System

Zauber Cauldrons now implements its own system of custom liquids. Expansions can hook into this system to add their own liquids. In some future update Zauber Cauldrons will move over to exclusively using this custom liquid system, i.e. instead of throwing a Poison II potion bottle into the cauldron to make a Poison IV potion, the player would then fill the Zauber Cauldron with Poison II liquid first and then upgrade this liquid and bottle it after.

Version Compatibility

This version of Zauber Cauldrons makes heavy use of 1.20.2+ features and does therefore not work in 1.20 or 1.20.1.

File-Driven Definitions

With this PR a folder ./raw/ is introduced. This folder holds configuration data for recipes and items in Zauber Cauldrons. To make editing these easier this PR adds the temporary lock files created by LibreOffice to .gitignore.

Expanded CustomModelData Support

With the custom liquid system and the file-driven definitions Zauber Cauldrons now provides extensive support for CustomModelData. Most items in Zauber Cauldrons, and the Magicol custom liquid now support CustomModelData. The numeric values can be assigned via the files in ./raw/.

@Bloo-dev Bloo-dev added the feature-update An additional feature has been added to a module label Jun 12, 2023
@Bloo-dev Bloo-dev marked this pull request as draft June 12, 2023 15:28
Adds functionality to the multi-use (soulution) property on splash and lingering potions.
These potions have had the necessary soulution nbt data since the introduction of soulutions,
but no functionality was implemented.
With this update, splash or lingering soulutions spawn an item with one less throw (localization of 'sips') upon breaking on a block.
Use beet to generate repetitive code from templates.
Use beet to generate repetitive code from templates.
These are now dynamically generated at build time.
Moves item loot tables to the items/ folder
The luck is still refreshed periodically to make it persist through the use of milk.
Trade changes will be implemented later.
Introduces a custom liquid system to Zauber Cauldrons.
This allows for the creation fo custom liquids via expansions.
Expansions can fully customize the interactions of
bottles and buckets on cauldrons.
The previous commit was a bit to enthusiastic in some places and missed other places.

(cherry picked from commit 63d4c06)
Now uses macros for wormhole targeting, significantly simplifying this process.
Cauldron coordinates and dimension are now precomputed and stored in the markers' nbt upon creation of a Zauber Cauldron.
Old Zauber Cauldrons and Wormholes are upgraded with the help of our upgrade paths framework.
@Bloo-dev
Copy link
Member Author

Bloo-dev commented Jan 8, 2024

I've tested this again on a fresh world of mine and everything is working as expected & feature complete now.

However, we must reserve CMD values before this is merged. I will get in touch with @SpecialBuilder32 for that. I will un-draft this PR once this has been resolved.

@Bloo-dev Bloo-dev marked this pull request as draft January 8, 2024 20:58
Zauber Crystals are now converted to 'minecraft:firework_star' items when in the offhand.
This prevents accidental placement of crystals, which could lead to item loss (e.g. when in lava).
This comes at the cost of no-RP users, however.
Crystals in the offhand are now colored firework stars, so still distinguishable, but no longer pretty without the resource pack.
HideFlags was only required before Zauber Cauldrons switched to using player heads for Zauber Cyrstals
This is no longer requried
@Bloo-dev Bloo-dev marked this pull request as ready for review January 13, 2024 16:57
@Bloo-dev
Copy link
Member Author

Did some more testing and found two more bugs, those are now fixed. I also teste dupgrading old worlds, which works without an issue.

@Bloo-dev Bloo-dev merged commit c0e8321 into Gamemode4Dev:master Jan 14, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Jan 14, 2024
…pdate) (#885)

* Enable Multi-Use Splash and Lingering Potions
Adds functionality to the multi-use (soulution) property on splash and lingering potions.
These potions have had the necessary soulution nbt data since the introduction of soulutions,
but no functionality was implemented.
With this update, splash or lingering soulutions spawn an item with one less throw (localization of 'sips') upon breaking on a block.

* Generate Zauber Armor and Zauber Crystal Code
Use beet to generate repetitive code from templates.

* Remove debug item modifiers

* Generate Zauber Potions Code
Use beet to generate repetitive code from templates.

* Remove Hardcoded Loot Tables
These are now dynamically generated at build time.

* Remove Overlays

* Move Loot Tables
Moves item loot tables to the items/ folder

* Change effect length of Zauber Cauldrons luck to infinite
The luck is still refreshed periodically to make it persist through the use of milk.

* Fix Wandering Trader Loot Table
Trade changes will be implemented later.

* Move align xyz to occur ealier in command chain

* Introduce Custom Liquid System
Introduces a custom liquid system to Zauber Cauldrons.
This allows for the creation fo custom liquids via expansions.
Expansions can fully customize the interactions of
bottles and buckets on cauldrons.

* Add compatibility with creative mode

* Rename wrongly named function tag

* Add Magicol Liquid

* Add CMD to magicol liquid

* Remove debug tellraws

* Add CustomModelData to Magicol

* Use Bolt to generate select_* functions from csv data

* Fix Zauber Armor Set Bonus

* Make Magicol moon phase and seed dependent

* Add visuals for moon phase on bottled vex items

* Add set bonus unequip sound

* Increase particle visibility of moon phase particles

* Implement Crafting Recipe for Bottled Magicol

* Add Libre Office .~lock Files to .gitignore

* FIx KeyError

* Introduce Zauber Biomes

* Clean up generate.py

* Restructure Thrown Potion Tracking

* Implement Biome Coloring

* Update Armor Activation Colors to New Potion Colors

* Add Advancements for Magicol

* Rebalance Wandering Trader Trades

* Improve Bottled Magicol Particle Effects

* Change Particle Displayed by Zauber Armor During Preferred Moon Phase

* Make Bottled Magicol Craftin Fail During Wrong Moon Phase

* Increase Sparkle Particle Range

* Prevent Particle Display Entity Buildup in Lazy Chunks

* Avoid Entity Buildup When Throwing Magicol

* Implement Special's Requested Changes

Co-authored-by: SpecialBuilder <[email protected]>

* Make Magicol Spawn Foliage

* Move Chorus System to /random and Fix AEC effect tag

* Add Toggle for Magicol Crafting

* Add 'Tase the Rainbow' Advancement

* Switch Color Codes to Hex
Adds an internal converter to allow for color definitions as hex within the ./raw/ files.

* Clean up formatting of generate.py

* Update Luck System

* Rename minecraft:grass to minecraft:short_grass

(cherry picked from commit 4fb860b)

* Complete Rename of Short Grass
The previous commit was a bit to enthusiastic in some places and missed other places.

(cherry picked from commit 63d4c06)

* Simplify Wormhole Targeting
Now uses macros for wormhole targeting, significantly simplifying this process.
Cauldron coordinates and dimension are now precomputed and stored in the markers' nbt upon creation of a Zauber Cauldron.
Old Zauber Cauldrons and Wormholes are upgraded with the help of our upgrade paths framework.

* Implement Special's Suggestion

* Add Zauber Liquids Recommendation

* Remove unused scoreboard

* Move tag removal to upgrade path

* Add CustomName to item display

* Fix Enchanted Prismarine Shard Recipe

* Fix Magicol Particles
Due to an earlier refactor magicol particle colors were evaluated as strings rather than integers

* Prevent Zauber Crystals from being placed when in the Offhand
Zauber Crystals are now converted to 'minecraft:firework_star' items when in the offhand.
This prevents accidental placement of crystals, which could lead to item loss (e.g. when in lava).
This comes at the cost of no-RP users, however.
Crystals in the offhand are now colored firework stars, so still distinguishable, but no longer pretty without the resource pack.

* Retroactively remove HideFlags from skull registery
HideFlags was only required before Zauber Cauldrons switched to using player heads for Zauber Cyrstals

* Update Crystal Colors & Make Crystals Unstackable
Relies on #937

* Undo HideFlags update paths
This is no longer requried

* Use hex codes for potion colors

* Use lib_player_heads Version 1.2
Depends on PR#937

* Update Strength Crystal Texture

* Update Skin Cache

* Add CustomModelData
CMD values have been generated by Special's #918

* Fix Potions of Leaping not Working

* Hide Luck Particles

---------

Co-authored-by: SpecialBuilder <[email protected]>
Co-authored-by: Misode <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-update An additional feature has been added to a module
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants