@@ -3,7 +3,7 @@
|
||||
@@ -15,6 +15,7 @@
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Gson b = LootSerialization.c().create();
|
||||
private Map<MinecraftKey, LootTable> c = ImmutableMap.of();
|
||||
private Map<MinecraftKey, LootTable> keyToLootTable = ImmutableMap.of();
|
||||
+ public Map<LootTable, MinecraftKey> lootTableToKey = ImmutableMap.of(); // CraftBukkit
|
||||
private final LootPredicateManager d;
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
@@ -62,6 +63,11 @@
|
||||
LootTableRegistry.LOGGER.warn("Found validation problem in " + s + ": " + s1);
|
||||
});
|
||||
this.c = immutablemap;
|
||||
this.keyToLootTable = immutablemap;
|
||||
+ // CraftBukkit start - build a reversed registry map
|
||||
+ ImmutableMap.Builder<LootTable, MinecraftKey> lootTableToKeyBuilder = ImmutableMap.builder();
|
||||
+ this.c.forEach((lootTable, key) -> lootTableToKeyBuilder.put(key, lootTable)); // PAIL rename keyToLootTable
|
||||
+ this.keyToLootTable.forEach((lootTable, key) -> lootTableToKeyBuilder.put(key, lootTable)); // PAIL rename keyToLootTable
|
||||
+ this.lootTableToKey = lootTableToKeyBuilder.build();
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user