add separate can_exclude property, so non-progression items can be marked non-excluded

This commit is contained in:
espeon65536
2021-07-15 08:46:07 -05:00
committed by Fabian Dill
parent 39a5921522
commit 0eee1f2d01
5 changed files with 16 additions and 6 deletions

View File

@@ -32,10 +32,10 @@ item_table = {
"4 Emeralds": ItemData(45017, False),
"Channeling Book": ItemData(45018, True),
"Silk Touch Book": ItemData(45019, True),
"Sharpness III Book": ItemData(45020, True),
"Sharpness III Book": ItemData(45020, False),
"Piercing IV Book": ItemData(45021, True),
"Looting III Book": ItemData(45022, True),
"Infinity Book": ItemData(45023, True),
"Looting III Book": ItemData(45022, False),
"Infinity Book": ItemData(45023, False),
"4 Diamond Ore": ItemData(45024, False),
"16 Iron Ore": ItemData(45025, False),
"500 XP": ItemData(45026, False),

View File

@@ -96,4 +96,7 @@ class MinecraftWorld(World):
def create_item(self, name: str) -> Item:
item_data = item_table[name]
return MinecraftItem(name, item_data.progression, item_data.code, self.player)
item = MinecraftItem(name, item_data.progression, item_data.code, self.player)
if "Book" in name: # prevent enchanted books from being excluded
item.can_be_excluded = False
return item