mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
30 lines
2.2 KiB
Diff
30 lines
2.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/storage/loot/LootTableManager.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/storage/loot/LootTableManager.java
|
|
@@ -26,7 +26,7 @@
|
|
{
|
|
private static final Logger LOGGER = LogManager.getLogger();
|
|
private static final Gson GSON_INSTANCE = (new GsonBuilder()).registerTypeAdapter(RandomValueRange.class, new RandomValueRange.Serializer()).registerTypeAdapter(LootPool.class, new LootPool.Serializer()).registerTypeAdapter(LootTable.class, new LootTable.Serializer()).registerTypeHierarchyAdapter(LootEntry.class, new LootEntry.Serializer()).registerTypeHierarchyAdapter(LootFunction.class, new LootFunctionManager.Serializer()).registerTypeHierarchyAdapter(LootCondition.class, new LootConditionManager.Serializer()).registerTypeHierarchyAdapter(LootContext.EntityTarget.class, new LootContext.EntityTarget.Serializer()).create();
|
|
- private final LoadingCache<ResourceLocation, LootTable> registeredLootTables = CacheBuilder.newBuilder().<ResourceLocation, LootTable>build(new LootTableManager.Loader());
|
|
+ private final LoadingCache<ResourceLocation, LootTable> registeredLootTables = CacheBuilder.newBuilder().<ResourceLocation, LootTable>build(new Loader());
|
|
private final File baseFolder;
|
|
|
|
public LootTableManager(@Nullable File folder)
|
|
@@ -111,7 +111,7 @@
|
|
|
|
try
|
|
{
|
|
- return (LootTable)JsonUtils.gsonDeserialize(LootTableManager.GSON_INSTANCE, s, LootTable.class);
|
|
+ return net.minecraftforge.common.ForgeHooks.loadLootTable(LootTableManager.GSON_INSTANCE, resource, s, true, LootTableManager.this);
|
|
}
|
|
catch (IllegalArgumentException | JsonParseException jsonparseexception)
|
|
{
|
|
@@ -153,7 +153,7 @@
|
|
|
|
try
|
|
{
|
|
- return (LootTable)JsonUtils.gsonDeserialize(LootTableManager.GSON_INSTANCE, s, LootTable.class);
|
|
+ return net.minecraftforge.common.ForgeHooks.loadLootTable(LootTableManager.GSON_INSTANCE, resource, s, false, LootTableManager.this);
|
|
}
|
|
catch (JsonParseException jsonparseexception)
|
|
{
|