MineColonies

MineColonies

53M Downloads

Mobs that are added to config to Guard Tower Attack List are not showing up

Neitcore opened this issue ยท 7 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.16.4
  • MineColonies Version: 0.13.515-ALPHA
  • Structurize Version: 0.13.102-ALPHA
  • Related Mods and their Versions: Ice and Fire 2.1.3

Expected behavior

Mobs that are added in config will show up in Guard Attack List
Hostile mobs from another mods are added into Guard Attack List
Guards will attack mobs from other mods

Actual behavior

After I added mobs from mod "Ice and Fire" and mobs from vanilla Minecraft into the config file in "guardresourcelocations" section and pressed the "recalculate" button, nothing changes in the list.

Steps to reproduce the issue

  1. Open config file
  2. Add to "guardresourcelocations" field, mobs that you want to add to Guard Atteck List
  3. Enter Minecraft world
  4. Open Guard Tower Attack List
  5. Press the recalculate button
  6. You will not see the mobs you have added

Logs

Notes


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

I tested this with minecraft:rabbit and saw a similar failure to attack rabbits on sight.

I did also test slimes, which I see are in that config list. Guards did attack slimes.

commented

I think the slimes work because they're categorized as monsters. Right now, it's comparing those config settings against full resourcekeys, of the format "ResourceKey[minecraft:entity_type / minecraft:rabbit]" for rabbits, or "ResourceKey[minecraft:entity_type / iceandfire:pixie]" for Ice and Fire Pixies, if you need something in the short term. Will see about pushing a fix.

commented

Rabbits are monsters (one of them, anyway)

commented

Just to see if I'm translating that properly, instead of:

	#List of guard resources. 
	guardresourcelocations = ["minecraft:slime", "tconstruct:blueslime"]

we'd say

	#List of guard resources. 
	guardresourcelocations = ["minecraft:slime", "tconstruct:blueslime", "ResourceKey[minecraft:entity_type / minecraft:rabbit]"]

?

commented

I think toml as a format is very picking about spacing around nested brackets. The last updated version seems to work fine:
image

But that said, it's a pretty easy fix to get the short location-only names going, and once it's in you'd go with the simpler formats anyway.

commented

It was my mistake, I was missing a double-quote character. ๐Ÿคฆโ€โ™‚๏ธ

By latest version 'works', you mean works with the "ResourceKey[minecraft:entity_type / minecraft:rabbit]" entry? Will a patch later likely break that functionality, and instead ask simply for "minecraft:rabbit"?

commented

It'll load properly using the sample you provided for existing public releases (and probably has affected all 1.16?).

I'd not expect the long ResourceKey names to work for very long, no; it's possible to support both formats, but there's really no reason to do so. Unless you're in a situation where you can't update or your guards are being Monty Python'd by a bunny swarm, probably better to just wait for another alpha or two.