mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Follow the loot source id and the explicit jigsaw overrides
Debug lore names the table by its path. The native structure start plan keeps SOURCE for an option the pack left out, as before.
This commit is contained in:
1 parent
b48192d355
commit
5e2eaba07e
5 files changed
+11
-8
No files matched your search
@@ -241,7 +241,7 @@ public class ModuleSettingsDecoderTest {
|
||||
() -> values("{\"mossValues\": {\"jigsaw\": {\"liquidSettings\": \"WET\"}}}"));
|
||||
|
||||
assertTrue(failure.getMessage(), failure.getMessage().contains(
|
||||
"\"WET\" is not one of [SOURCE, IGNORE_WATERLOGGING, APPLY_WATERLOGGING]"));
|
||||
"\"WET\" is not one of [IGNORE_WATERLOGGING, APPLY_WATERLOGGING]"));
|
||||
}
|
||||
|
||||
private ValuesSettings values(String json) {
|
||||
|
||||
@@ -127,12 +127,14 @@ public class LootItemsTest {
|
||||
public void debugItemsSayWhereTheyCameFrom() {
|
||||
LootTable table = table("{\"name\": \"dungeon\", \"rarity\": 4, \"minPicked\": 1, \"maxPicked\": 1, \"loot\": [{\"type\": \"diamond\", \"rarity\": 3}]}");
|
||||
|
||||
List<ItemDrop> drops = new LootItems(registry, true, ModuleLogs.discarding()).draw("dungeon", table, LOOT_SEED, 0, 64, 0);
|
||||
ResourceId dungeon = ResourceId.parse("test:dungeon");
|
||||
|
||||
List<ItemDrop> drops = new LootItems(registry, true, ModuleLogs.discarding()).draw(dungeon, table, LOOT_SEED, 0, 64, 0);
|
||||
|
||||
for (ItemDrop drop : drops) {
|
||||
assertEquals(Optional.of(new ItemDrop.Source(Optional.of("dungeon"), 4, 3)), drop.source());
|
||||
assertEquals(Optional.of(new ItemDrop.Source(Optional.of(dungeon), 4, 3)), drop.source());
|
||||
}
|
||||
assertTrue(new LootItems(registry, false, ModuleLogs.discarding()).draw("dungeon", table, LOOT_SEED, 0, 64, 0).stream().allMatch(drop -> drop.source().isEmpty()));
|
||||
assertTrue(new LootItems(registry, false, ModuleLogs.discarding()).draw(dungeon, table, LOOT_SEED, 0, 64, 0).stream().allMatch(drop -> drop.source().isEmpty()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user