mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
MC: 1.17 support (#120)
* MC: add death_link option * Minecraft: 1.17 advancements and logic support * Update Minecraft tracker to 1.17 * Minecraft: add tests for new advancements * removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install * Add required_bosses option choices are none, ender_dragon, wither, both postgame advancements are set according to the required boss for completion * fix docstring for PostgameAdvancements * Minecraft: add starting_items List of dicts: item, amount, nbt * Update descriptions for AdvancementGoal and EggShardsRequired * Minecraft: fix tests for required_bosses attribute * Minecraft: updated logic for various dragon-related advancements Split the logic into can_respawn and can_kill dragon Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not * Minecraft client: ignore prereleases unless --prerelease flag is on * explicitly state all defaults change structure shuffle and structure compass defaults to true update install tutorial to point to player-settings page, as well as removing instructions for manual install * Minecraft client: add Minecraft version check Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file. This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says. Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
This commit is contained in:
@@ -613,19 +613,24 @@ class TestAdvancements(TestMinecraft):
|
||||
["You Need a Mint", False, [], ['Progressive Resource Crafting']],
|
||||
["You Need a Mint", False, [], ['Flint and Steel']],
|
||||
["You Need a Mint", False, [], ['Progressive Tools']],
|
||||
["You Need a Mint", False, ['Progressive Weapons'], ['Progressive Weapons', 'Progressive Weapons']],
|
||||
["You Need a Mint", False, [], ['Progressive Armor']],
|
||||
["You Need a Mint", False, [], ['Progressive Weapons']],
|
||||
["You Need a Mint", False, [], ['Progressive Armor', 'Shield']],
|
||||
["You Need a Mint", False, [], ['Brewing']],
|
||||
["You Need a Mint", False, [], ['Bottles']],
|
||||
["You Need a Mint", False, ['Progressive Tools', 'Progressive Tools'], ['Bucket', 'Progressive Tools']],
|
||||
["You Need a Mint", False, ['3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls'], ['3 Ender Pearls']],
|
||||
["You Need a Mint", False, [], ['Archery']],
|
||||
["You Need a Mint", False, [], ['Bottles']],
|
||||
["You Need a Mint", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket',
|
||||
'Progressive Weapons', 'Progressive Weapons', 'Archery', 'Progressive Armor',
|
||||
'Brewing', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
["You Need a Mint", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket',
|
||||
'Progressive Weapons', 'Progressive Armor', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
["You Need a Mint", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools',
|
||||
'Progressive Weapons', 'Progressive Weapons', 'Archery', 'Progressive Armor',
|
||||
'Brewing', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
'Progressive Weapons', 'Progressive Armor', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
["You Need a Mint", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket',
|
||||
'Progressive Weapons', 'Shield', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
["You Need a Mint", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools',
|
||||
'Progressive Weapons', 'Shield', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Bottles']],
|
||||
])
|
||||
|
||||
def test_42047(self):
|
||||
@@ -954,7 +959,11 @@ class TestAdvancements(TestMinecraft):
|
||||
|
||||
def test_42072(self):
|
||||
self.run_location_tests([
|
||||
["A Throwaway Joke", True, []],
|
||||
["A Throwaway Joke", False, []],
|
||||
["A Throwaway Joke", False, [], ['Progressive Weapons']],
|
||||
["A Throwaway Joke", False, [], ['Campfire', 'Progressive Resource Crafting']],
|
||||
["A Throwaway Joke", True, ['Progressive Weapons', 'Campfire']],
|
||||
["A Throwaway Joke", True, ['Progressive Weapons', 'Progressive Resource Crafting']],
|
||||
])
|
||||
|
||||
def test_42073(self):
|
||||
@@ -1143,3 +1152,127 @@ class TestAdvancements(TestMinecraft):
|
||||
["Overpowered", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Progressive Tools', 'Flint and Steel', 'Bucket', 'Progressive Weapons', 'Shield']],
|
||||
])
|
||||
|
||||
def test_42092(self):
|
||||
self.run_location_tests([
|
||||
["Wax On", False, []],
|
||||
["Wax On", False, [], ["Progressive Tools"]],
|
||||
["Wax On", False, [], ["Campfire"]],
|
||||
["Wax On", False, ["Progressive Resource Crafting"], ["Progressive Resource Crafting"]],
|
||||
["Wax On", True, ["Progressive Tools", "Progressive Resource Crafting", "Progressive Resource Crafting", "Campfire"]],
|
||||
])
|
||||
|
||||
def test_42093(self):
|
||||
self.run_location_tests([
|
||||
["Wax Off", False, []],
|
||||
["Wax Off", False, [], ["Progressive Tools"]],
|
||||
["Wax Off", False, [], ["Campfire"]],
|
||||
["Wax Off", False, ["Progressive Resource Crafting"], ["Progressive Resource Crafting"]],
|
||||
["Wax Off", True, ["Progressive Tools", "Progressive Resource Crafting", "Progressive Resource Crafting", "Campfire"]],
|
||||
])
|
||||
|
||||
def test_42094(self):
|
||||
self.run_location_tests([
|
||||
["The Cutest Predator", False, []],
|
||||
["The Cutest Predator", False, [], ["Progressive Tools"]],
|
||||
["The Cutest Predator", False, [], ["Progressive Resource Crafting"]],
|
||||
["The Cutest Predator", False, [], ["Bucket"]],
|
||||
["The Cutest Predator", True, ["Progressive Tools", "Progressive Resource Crafting", "Bucket"]],
|
||||
])
|
||||
|
||||
def test_42095(self):
|
||||
self.run_location_tests([
|
||||
["The Healing Power of Friendship", False, []],
|
||||
["The Healing Power of Friendship", False, [], ["Progressive Tools"]],
|
||||
["The Healing Power of Friendship", False, [], ["Progressive Resource Crafting"]],
|
||||
["The Healing Power of Friendship", False, [], ["Bucket"]],
|
||||
["The Healing Power of Friendship", True, ["Progressive Tools", "Progressive Resource Crafting", "Bucket"]],
|
||||
])
|
||||
|
||||
def test_42096(self):
|
||||
self.run_location_tests([
|
||||
["Is It a Bird?", False, []],
|
||||
["Is It a Bird?", False, [], ["Progressive Weapons"]],
|
||||
["Is It a Bird?", False, [], ["Progressive Tools"]],
|
||||
["Is It a Bird?", False, [], ["Progressive Resource Crafting"]],
|
||||
["Is It a Bird?", False, [], ["Spyglass"]],
|
||||
["Is It a Bird?", True, ["Progressive Weapons", "Progressive Tools", "Progressive Resource Crafting", "Spyglass"]],
|
||||
])
|
||||
|
||||
def test_42097(self):
|
||||
self.run_location_tests([
|
||||
["Is It a Balloon?", False, []],
|
||||
["Is It a Balloon?", False, [], ['Progressive Resource Crafting']],
|
||||
["Is It a Balloon?", False, [], ['Flint and Steel']],
|
||||
["Is It a Balloon?", False, [], ['Progressive Tools']],
|
||||
["Is It a Balloon?", False, [], ['Progressive Weapons']],
|
||||
["Is It a Balloon?", False, [], ['Spyglass']],
|
||||
["Is It a Balloon?", False, ['Progressive Tools', 'Progressive Tools'], ['Bucket', 'Progressive Tools']],
|
||||
["Is It a Balloon?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket', 'Progressive Weapons', 'Spyglass']],
|
||||
["Is It a Balloon?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools', 'Progressive Weapons', 'Spyglass']],
|
||||
])
|
||||
|
||||
def test_42098(self):
|
||||
self.run_location_tests([
|
||||
["Is It a Plane?", False, []],
|
||||
["Is It a Plane?", False, [], ['Progressive Resource Crafting']],
|
||||
["Is It a Plane?", False, [], ['Flint and Steel']],
|
||||
["Is It a Plane?", False, [], ['Progressive Tools']],
|
||||
["Is It a Plane?", False, [], ['Progressive Weapons']],
|
||||
["Is It a Plane?", False, [], ['Progressive Armor', 'Shield']],
|
||||
["Is It a Plane?", False, [], ['Brewing']],
|
||||
["Is It a Plane?", False, ['Progressive Tools', 'Progressive Tools'], ['Bucket', 'Progressive Tools']],
|
||||
["Is It a Plane?", False, ['3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls'], ['3 Ender Pearls']],
|
||||
["Is It a Plane?", False, [], ['Spyglass']],
|
||||
["Is It a Plane?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket',
|
||||
'Progressive Weapons', 'Progressive Armor', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Spyglass']],
|
||||
["Is It a Plane?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools',
|
||||
'Progressive Weapons', 'Progressive Armor', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Spyglass']],
|
||||
["Is It a Plane?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket',
|
||||
'Progressive Weapons', 'Shield', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Spyglass']],
|
||||
["Is It a Plane?", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools',
|
||||
'Progressive Weapons', 'Shield', 'Brewing',
|
||||
'3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', '3 Ender Pearls', 'Spyglass']],
|
||||
])
|
||||
|
||||
def test_42099(self):
|
||||
self.run_location_tests([
|
||||
["Surge Protector", False, []],
|
||||
["Surge Protector", False, [], ['Channeling Book']],
|
||||
["Surge Protector", False, ['Progressive Resource Crafting'], ['Progressive Resource Crafting']],
|
||||
["Surge Protector", False, [], ['Enchanting']],
|
||||
["Surge Protector", False, [], ['Progressive Tools']],
|
||||
["Surge Protector", False, [], ['Progressive Weapons']],
|
||||
["Surge Protector", True, ['Progressive Weapons', 'Progressive Tools', 'Progressive Tools', 'Progressive Tools',
|
||||
'Enchanting', 'Progressive Resource Crafting', 'Progressive Resource Crafting', 'Channeling Book']],
|
||||
])
|
||||
|
||||
def test_42100(self):
|
||||
self.run_location_tests([
|
||||
["Light as a Rabbit", False, []],
|
||||
["Light as a Rabbit", False, [], ["Progressive Weapons"]],
|
||||
["Light as a Rabbit", False, [], ["Progressive Tools"]],
|
||||
["Light as a Rabbit", False, [], ["Progressive Resource Crafting"]],
|
||||
["Light as a Rabbit", False, [], ["Bucket"]],
|
||||
["Light as a Rabbit", True, ["Progressive Weapons", "Progressive Tools", "Progressive Resource Crafting", "Bucket"]],
|
||||
])
|
||||
|
||||
def test_42101(self):
|
||||
self.run_location_tests([
|
||||
["Glow and Behold!", False, []],
|
||||
["Glow and Behold!", False, [], ["Progressive Weapons"]],
|
||||
["Glow and Behold!", False, [], ["Progressive Resource Crafting", "Campfire"]],
|
||||
["Glow and Behold!", True, ["Progressive Weapons", "Progressive Resource Crafting"]],
|
||||
["Glow and Behold!", True, ["Progressive Weapons", "Campfire"]],
|
||||
])
|
||||
|
||||
def test_42102(self):
|
||||
self.run_location_tests([
|
||||
["Whatever Floats Your Goat!", False, []],
|
||||
["Whatever Floats Your Goat!", False, [], ["Progressive Weapons"]],
|
||||
["Whatever Floats Your Goat!", False, [], ["Progressive Resource Crafting", "Campfire"]],
|
||||
["Whatever Floats Your Goat!", True, ["Progressive Weapons", "Progressive Resource Crafting"]],
|
||||
["Whatever Floats Your Goat!", True, ["Progressive Weapons", "Campfire"]],
|
||||
])
|
||||
|
@@ -4,7 +4,7 @@ from BaseClasses import MultiWorld
|
||||
from worlds import AutoWorld
|
||||
from worlds.minecraft import MinecraftWorld
|
||||
from worlds.minecraft.Items import MinecraftItem, item_table
|
||||
from worlds.minecraft.Options import AdvancementGoal, CombatDifficulty, BeeTraps
|
||||
from worlds.minecraft.Options import *
|
||||
from Options import Toggle, Range
|
||||
|
||||
# Converts the name of an item into an item object
|
||||
@@ -30,16 +30,17 @@ class TestMinecraft(TestBase):
|
||||
self.world = MultiWorld(1)
|
||||
self.world.game[1] = "Minecraft"
|
||||
self.world.worlds[1] = MinecraftWorld(self.world, 1)
|
||||
exclusion_pools = ['hard', 'insane', 'postgame']
|
||||
exclusion_pools = ['hard', 'unreasonable', 'postgame']
|
||||
for pool in exclusion_pools:
|
||||
setattr(self.world, f"include_{pool}_advancements", [False, False])
|
||||
setattr(self.world, f"include_{pool}_advancements", {1: False})
|
||||
setattr(self.world, "advancement_goal", {1: AdvancementGoal(30)})
|
||||
setattr(self.world, "shuffle_structures", {1: Toggle(False)})
|
||||
setattr(self.world, "combat_difficulty", {1: CombatDifficulty(1)}) # normal
|
||||
setattr(self.world, "egg_shards_required", {1: EggShardsRequired(0)})
|
||||
setattr(self.world, "egg_shards_available", {1: EggShardsAvailable(0)})
|
||||
setattr(self.world, "required_bosses", {1: BossGoal(1)}) # ender dragon
|
||||
setattr(self.world, "shuffle_structures", {1: ShuffleStructures(False)})
|
||||
setattr(self.world, "bee_traps", {1: BeeTraps(0)})
|
||||
setattr(self.world, "combat_difficulty", {1: CombatDifficulty(1)}) # normal
|
||||
setattr(self.world, "structure_compasses", {1: Toggle(False)})
|
||||
setattr(self.world, "egg_shards_required", {1: Range(0)})
|
||||
setattr(self.world, "egg_shards_available", {1: Range(0)})
|
||||
AutoWorld.call_single(self.world, "create_regions", 1)
|
||||
AutoWorld.call_single(self.world, "generate_basic", 1)
|
||||
AutoWorld.call_single(self.world, "set_rules", 1)
|
||||
|
Reference in New Issue
Block a user