McJtyMods / RFToolsUtility

Everything from RFTools that doesn't fit in its own mod
MIT License
18 stars 17 forks source link

Log spam from missing mob spawn amounts list #128

Open aaronhowser1 opened 2 years ago

aaronhowser1 commented 2 years ago

image

The line [Server thread/ERROR] [mcjtylib/]: The mob spawn amounts list for mob thermal:basalz is missing! is pushed to the console for every tick that a Basalz Syringe is in the spawner. Originally this issue was just going to be that you can't spawn Basalz, but the log spam is really more important.

rftoolsutility-1.16-3.1.11 FTBTeam/FTB-Modpack-Issues/issues/638

McJty commented 2 years ago

Well that means there is some misconfiguration there

aaronhowser1 commented 2 years ago

I don't see anything in the config or serverconfig for rftools utility about this

McJty commented 2 years ago

Hmm it must be there. Can you show me?

aaronhowser1 commented 2 years ago

This is the entire block for the spawner in the rftoolsutility-server serverconfig:

#Settings for the spawner system
[spawner]
    #Maximum amount of injections we need to do a full mob extraction.
    #Range: > 1
    maxMobInjections = 10
McJty commented 2 years ago

Spawner configuration is actually done with recipes in the datapack. I guess something is wrong there

aaronhowser1 commented 2 years ago

The recipe being broken is bad, but the log spam is the bigger problem I think. If you put any random mob in that doesn't have a recipe, you can grow the latest.log to gigabytes in minutes if you use enough spawners.

McJty commented 2 years ago

yes but it needs to be fixed at datapack level

sarim commented 2 years ago

From my understanding of rftool code, You have to add a recipe via datapack. rftools comes with vanilla mob's recipies. ex: https://github.com/McJtyMods/RFToolsUtility/blob/1.16/src/generated/resources/data/rftoolsutility/recipes/minecraft_creeper.json

It could be a nice feature to automatically generate these recipes, I have no idea if it is technically possible, but the logic would be something like, scan loot table to discover that item the mob drops, then make a spawner recipe making that item's 0.1 amount as first ingredient. No idea how to determine the 2nd dimensional one (dirt vs netherrack vs endstone). 3rd one is always livingmatter...

Also, thought it'd be a separate issue:, Rftools could introduce a config like LogMissingSpawnerRecipe default = false.

Zeoic commented 2 years ago

This still seems to be an issue. It is incredibly excessive to spam the log once per game tick with this message. Can it not be slowed down? Something like once per minute would be much better.

McJty commented 2 years ago

The best solution is simply to fix the broken recipe

Zeoic commented 2 years ago

I think the best solution may be to remove this mod, that easily causes memory to full up and makes the console useless when a user attempts to use one if its blocks, from the server. There is simply no need to kill servers just because your mod can't handle other mods.

This is a problem with the mod, not with configuration. Absence of extra custom configs should not cripple the game. You can't expect users to become devs just to resolve something your mod doesn't handle well. At the very least, there should be a warning on the mod download page with steps to rectify this game breaking issue.

McJty commented 2 years ago

Sorry but that doesn't make sense. The broken recipe is NOT part of my mod. It was added by the modpack. So how should I be responsible for fixing that? The modpack should fix this

aaronhowser1 commented 2 years ago

The modpack did not have a custom recipe for it, to my knowledge, nor does Thermal Foundation

McJty commented 2 years ago

hmm weird. Then I'm not sure why this is

aaronhowser1 commented 2 years ago

Is mob spawn amount by chance the first part of the recipe? Maybe it's just seeing that the first part of the json is missing and reporting that, when in reality the json doesn't exist in the first place

jeremiahwinsley commented 1 year ago

This happens when the recipe doesn't exist at all, it's not due to an invalid json. https://github.com/McJtyMods/RFToolsUtility/blob/a37b889f45d19b40e451acf6e13593d64f6546bc/src/main/java/mcjty/rftoolsutility/modules/spawner/blocks/SpawnerTileEntity.java#L207-L213 https://github.com/McJtyMods/RFToolsUtility/blob/a37b889f45d19b40e451acf6e13593d64f6546bc/src/main/java/mcjty/rftoolsutility/modules/spawner/recipes/SpawnerRecipes.java#L21-L30

I don't think this should even be an error, as a pack dev I do not want all mobs to be spawnable, so while adding recipes for the mobs would get rid of the error, it's not a real fix.

A useful form of this would be a config option, disabled by default, that will log a list of all mobs with no matching recipe to the debug log when loadRecipes is fired. That way, we are able to see what recipes we could add, without being spammed if we don't.