Jump to content

Recommended Posts

Posted

Hi everyone,

 

I try to use loot_tables in my mod but get these error(I cant see how to fix this)

 

[20:49:51] [server thread/ERROR]: Couldn't load loot table planttech:loot_table_leaved_floating_island from file:/C:/Users/chris/Documents/Minecraft%20Mod/Planttech/forge-1.9.4-12.17.0.1937-mdk/bin/assets/planttech/loot_tables/loot_table_leaved_floating_island.json

com.google.gson.JsonParseException: Loot Table "planttech:loot_table_leaved_floating_island" Missing `name` entry for pool #0

at net.minecraftforge.common.ForgeHooks.readPoolName(ForgeHooks.java:1089) ~[ForgeHooks.class:?]

at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:152) ~[LootPool$Serializer.class:?]

at net.minecraft.world.storage.loot.LootPool$Serializer.deserialize(LootPool.java:147) ~[LootPool$Serializer.class:?]

at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]

at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[TypeAdapterRuntimeTypeWrapper.class:?]

at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[ArrayTypeAdapter.class:?]

at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:868) ~[Gson.class:?]

at com.google.gson.Gson$1.deserialize(Gson.java:126) ~[Gson$1.class:?]

at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:378) ~[JsonUtils.class:?]

at net.minecraft.util.JsonUtils.deserializeClass(JsonUtils.java:400) ~[JsonUtils.class:?]

at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:209) ~[LootTable$Serializer.class:?]

at net.minecraft.world.storage.loot.LootTable$Serializer.deserialize(LootTable.java:204) ~[LootTable$Serializer.class:?]

at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]

at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:768) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:717) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:689) ~[Gson.class:?]

at net.minecraftforge.common.ForgeHooks.loadLootTable(ForgeHooks.java:1013) ~[ForgeHooks.class:?]

at net.minecraft.world.storage.loot.LootTableManager$Loader.loadBuiltinLootTable(LootTableManager.java:148) [LootTableManager$Loader.class:?]

at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:71) [LootTableManager$Loader.class:?]

at net.minecraft.world.storage.loot.LootTableManager$Loader.load(LootTableManager.java:52) [LootTableManager$Loader.class:?]

at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]

at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]

at net.minecraft.world.storage.loot.LootTableManager.getLootTableFromLocation(LootTableManager.java:39) [LootTableManager.class:?]

at net.minecraft.tileentity.TileEntityLockableLoot.fillWithLoot(TileEntityLockableLoot.java:55) [TileEntityLockableLoot.class:?]

at net.minecraft.tileentity.TileEntityChest.createContainer(TileEntityChest.java:487) [TileEntityChest.class:?]

at net.minecraft.entity.player.EntityPlayerMP.displayGUIChest(EntityPlayerMP.java:860) [EntityPlayerMP.class:?]

at net.minecraft.block.BlockChest.onBlockActivated(BlockChest.java:420) [blockChest.class:?]

at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:475) [PlayerInteractionManager.class:?]

at net.minecraft.network.NetHandlerPlayServer.processRightClickBlock(NetHandlerPlayServer.java:707) [NetHandlerPlayServer.class:?]

at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) [CPacketPlayerTryUseItemOnBlock.class:?]

at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) [CPacketPlayerTryUseItemOnBlock.class:?]

at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) [PacketThreadUtil$1.class:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_73]

at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_73]

at net.minecraft.util.Util.runTask(Util.java:25) [util.class:?]

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:740) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685) [MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155) [integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534) [MinecraftServer.class:?]

at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]

 

 

here is the loot_table:

 

{
    "pools": [
        {
            "rolls": {
                "min": 2,
                "max": 4
            },
            "entries": [
                {
                    "type": "item",
                    "name": "planttech:cookie_blue",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:cookie_yellow",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:cookie_pink",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:cookie_red",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                {
                    "type": "item",
                    "name": "planttech:cookie_white",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:metalblock",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 2,
                                "max": 5
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:plantwire",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 10,
                                "max": 25
                            }
                        }
                    ],
                    "weight": 25
                },
                 {
                    "type": "item",
                    "name": "planttech:crystal_diamond",
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 1,
                                "max": 2
                            }
                        }
                    ],
                    "weight": 15
                }
                
                
            ]
        }
    ]
}

Posted

Each loot pool (object in the

"pools"

array) must have a

"name"

field containing the name of the pool. This must be unique within the loot table, but not globally unique.

 

This requirement was added by Forge as part of the

LootTable

interaction system.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.