The Lost Cities

The Lost Cities

59M Downloads

Problems with chests

Opened this issue ยท 11 comments

commented

Some of the chests are invisible. I believe these invisible chests are the ones that use the custom loot tables of lostcitychest.json and raildungeonchest.json. I believe the tables are incorrectly formatted. For example, here is a part of the desert pyramid loot table:
{
"pools": [
{
"name": "main",
"entries": [
{
"entryName": "minecraft:sand",
"weight": 10,
"quality": 0,
"type": "item",
"functions": [
{
"count": {
"min": 1.0,
"max": 8.0
},
"function": "minecraft:set_count"
}
],
"name": "minecraft:sand"
}
],
"rolls": 4.0
}
]
}
Whereas in the lost cities chest table it is:
{
"pools": [
{
"name": "lostcities:lostcitychest",
"rolls": {
"min": 2,
"max": 4
},
"entries": [
{
"type": "item",
"name": "minecraft:diamond_sword",
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
}
],
"weight": 2
}
]
}
]
}
I found this a bit of an annoyance because i wanted to modify the tables in order to get them to spawn guns, ammunition, magazines and attachments as well as the default loot. I have tried reformatting the loot tables with the "correct" formatting, but they still do not work. If you could try to fix this I would be happy.

commented

What version of Lost Cities and of Forge? What config/presets? Can you reproduce this with no other mods installed? If not, can you figure out which other mod is causing it?

commented

Im using lost cities 1.12 2.0.10 and forge 1.12.2-14.23.1.2601. I cannot test the for what mods are causing it as i have to get off, but i will do so tomorrow and put my results here

commented

I have just tested it with no other mods, some chests are invisible but turn visible after opening it, but are empty, and some of the chests are visible but also empty. Upon attempting to dump the loot table with loot tweaker, it comes up with nothing.

commented

Did you try without LootTweaker present too? Is this with standard configs and presets? What's the seed and coordinates of a broken chest?

commented

This issue has been marked as needing a response from the reporter for over 2 weeks without receiving one. As such, it has been automatically closed.

commented

I have found this issue as well I believe. I ran a fresh 1.12.2 with forge from Twitch launcher and this mod to confirm. Chests will suddenly pop into existence from a previous air filled block to be completely empty inside. The most frequent culprits appear to be the chests set upon 2x3 or 3x3 platforms above 2 spawners. This happens on default config.

commented

This has been reported before and I've actually encountered it myself but so far I have no clue what's wrong

commented

Experiencing this issue as well.
Chests are invisible (can find them with scannable), on closer inspection (literally) they show up, but are empty. Doesn't happen to all of them, tho.
I get some console warnings about chests getting overfilled, but I'm not yet sure if it has to do with that.
Currently running the Omnifactory 1.5 server pack (Forge 2838, Lost Cities ver. 2.0.20, whole bunch of other mods)
What additional information would be required to help with that?

commented

is this issue solved in 2020? @McJty

commented

I have given up on this. I no longer develop in 1.12 and I have never been able to find out why this happens. Sorry

commented

The issue partially lies here:
https://github.com/McJtyMods/LostCities/blame/1.12/src/main/java/mcjty/lostcities/dimensions/world/terraingen/LostCitiesTerrainGenerator.java#L2132

When noLoot is true, MobSpawners are set to air blocks, instead of spawning them. Whereas chests, when noLoot is true, are still spawned, but without LootTodo. This causes them to spawn invisible until interacted with, and empty, probably due to some missing data or null value somewhere.
The in-code solution to this is either do the same thing to chests as to spawners, and set the block to air instead of spawning an empty chest, or still spawn the chest, but set it with an empty loottable, instead of just nothing at all.

As its unlikely LostCities will get another 1.12.2 update though, there is a workaround for users. In profile_default (or whatever your custom profile is) set these two settings to 0.0:
S:buildingWithoutLootChance=0.0
and
S:chestWithoutLootChance=0.0

This should make buildings never spawn without loot, therefor avoiding this issue. If you still want some chests to spawn without loot, use empty loottables in conditions.json to do it instead.