Jump to content

1.12.2 loot table set data function


DinoPawz

Recommended Posts

Hi,

 

I have a loot table. It checks out to be valid json and it runs fine without the problem code below:

 

{
      "type": "item",
      "name": "minecraft:wool",
      "weight": 15,
      "functions": [
        {
          "function": "minecraft:set_data",
          "data": 0
        },
        {
          "function": "minecraft:set_count",
          "count": {
            "min": 1,
            "max": 5
          }
        }
      ]
    }

 

I followed the tutorial here: https://github.com/skylinerw/guides/blob/master/java/loot tables.md

 

The error message in the log file:

[18:50:27] [Server thread/ERROR] [minecraft/LootTableManager]: Couldn't load loot table oreberriesgalore:king_den_loot_table from file:/C:/Users/dino/IdeaProjects/Oreberries-1.12.2/classes/production/Oreberries-1.12.2.main/assets/oreberriesgalore/loot_tables/king_den_loot_table.json
com.google.gson.JsonSyntaxException: Missing entries
    at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:375) ~[JsonUtils.class:?]
    at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:153) ~[LootPool$Serializer.class:?]
    at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:147) ~[LootPool$Serializer.class:?]
    at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?]
    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[TypeAdapterRuntimeTypeWrapper.class:?]
    at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[ArrayTypeAdapter.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:952) ~[Gson.class:?]
    at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) ~[TreeTypeAdapter$GsonContextImpl.class:?]
    at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:359) ~[JsonUtils.class:?]
    at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:381) ~[JsonUtils.class:?]
    at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:210) ~[LootTable$Serializer.class:?]
    at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:205) ~[LootTable$Serializer.class:?]
    at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[TreeTypeAdapter.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:852) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:801) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:773) ~[Gson.class:?]
    at net.minecraftforge.common.ForgeHooks.loadLootTable(ForgeHooks.java:1163) ~[ForgeHooks.class:?]
    at net.minecraft.world.storage.loot.LootTableManager$Loader.loadBuiltinLootTable(LootTableManager.java:156) [LootTableManager$Loader.class:?]
    at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:72) [LootTableManager$Loader.class:?]
    at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:53) [LootTableManager$Loader.class:?]
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?]
    at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?]
    at net.minecraft.world.storage.loot.LootTableManager.getLootTableFromLocation(LootTableManager.java:40) [LootTableManager.class:?]
    at net.minecraft.world.storage.loot.LootTableManager.reloadLootTables(LootTableManager.java:49) [LootTableManager.class:?]
    at net.minecraft.world.storage.loot.LootTableManager.<init>(LootTableManager.java:35) [LootTableManager.class:?]
    at net.minecraft.world.WorldServer.init(WorldServer.java:161) [WorldServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:123) [IntegratedServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:160) [IntegratedServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:552) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.