Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

The Statue Cauldron

a1qs edited this page Dec 25, 2024 · 1 revision

The Statue Cauldron is another Block returning from Vault Hunters 2nd Edition.

Functionality

The Cauldron mimics pretty much the same functionality as it did in VH2 with slight tweaks.
To use the Cauldron it needs to be filled with a Water Bucket to make use of it.
To insert items, players need to throw Loot Statues in a 3x3x3 Range of the cauldron to insert them, then they get inserted alongside their names, which gets used to pick a random name once a statue generates.

Configuration

{
  "defaultRequirement": 100,
  "playerRequirement": {
    "example_name": 50,
  },
  "itemValues": {
    "vaultadditions:loot_statue_gift": 2,
    "vaultadditions:loot_statue_gift_mega": 5,
    "vaultadditions:loot_statue_arena": 3,
    "vaultadditions:loot_statue_vault": 1
  }
}

This is the statue_recycling.json config, this is not a custom config, but a config that has been reused for this.

  • the defaultRequirement config value defines the amount of statue "juice" that needs to be inserted to create a mega statue
  • the playerRequirement list defines custom values for specified players, so that others may have a higher or a lower requirement
  • the itemValues list defines values for various statue blocks that add to the count.

Technical

  • Upon use, it makes sure thatthe itemStack in hand is NOT a potion to prevent the cauldron from turning into a vanilla cauldron
  • If the player is not in creative mode, it gets the IFluidHandlerItem in the players hand and drains it by 1000mb, awards the FILL_CAULDRON stat, updates the block and plays a sound
  • Upon Placement it configures the cauldron state to ensure that it doesnt crash due to an unknown fill level.
  • It makes use of a FillLevel Blockstate definition to ensure the cauldron properly detects its fill levels
  • Upon being placed, it checks for the ItemStacks BlockEntityTag, if there is the specified tag, it sets the data from the tag to the BlockEntity, otherwise it sets the owner to the player who is placing the cauldron and configures the required amount through the statue_recycling.json config file provided by the Vault mod
  • The Cauldron makes use of a ServerTicker that checks if the fill level is equal to 3, if true, it gets all the Statue Item entities in a 3x3x3 range around the cauldron and adds all with their respective values in the statue_recycling.json config, in addition, it adds all the names from the statues
  • If filled, it generates a LootStatue from the Vault Mod, and resets the cauldron, the names from the inserted statues will be considered to be the statues name, while shuffling the list prior to this.

Clone this wiki locally