Minecraft: Update to new options system. (#3765)

* Move to new options system.
switch to using self.random
reformat rules file.

* further reformats

* fix tests to use new options system.

* fix slot data to not use self.multiworld

* I hate python

* new starting_items docstring to prepare for 1.20.5+ item components.
fix invalid json being output to starting_items

* more typing fixes.

* stupid quotes around type declarations

* removed unused variable in ItemPool.py
change null check in Structures.py

* update rules "self" variable to a "world: MinecraftWorld" variable

* get key, and not value for required bosses.
This commit is contained in:
KonoTyran
2024-08-19 15:58:30 -07:00
committed by GitHub
parent 1e8a8e7482
commit c010c8c938
7 changed files with 517 additions and 308 deletions

View File

@@ -1,19 +1,19 @@
from . import MCTestBase
from ..Constants import region_info
from ..Options import minecraft_options
from .. import Options
from BaseClasses import ItemClassification
class AdvancementTestBase(MCTestBase):
options = {
"advancement_goal": minecraft_options["advancement_goal"].range_end
"advancement_goal": Options.AdvancementGoal.range_end
}
# beatability test implicit
class ShardTestBase(MCTestBase):
options = {
"egg_shards_required": minecraft_options["egg_shards_required"].range_end,
"egg_shards_available": minecraft_options["egg_shards_available"].range_end
"egg_shards_required": Options.EggShardsRequired.range_end,
"egg_shards_available": Options.EggShardsAvailable.range_end
}
# check that itempool is not overfilled with shards
@@ -29,7 +29,7 @@ class CompassTestBase(MCTestBase):
class NoBeeTestBase(MCTestBase):
options = {
"bee_traps": 0
"bee_traps": Options.BeeTraps.range_start
}
# With no bees, there are no traps in the pool
@@ -40,7 +40,7 @@ class NoBeeTestBase(MCTestBase):
class AllBeeTestBase(MCTestBase):
options = {
"bee_traps": 100
"bee_traps": Options.BeeTraps.range_end
}
# With max bees, there are no filler items, only bee traps