(Feature Request/Question) Lost Cities and Lost Souls Compatibility
XzeroAir opened this issue · 7 comments
I'm wondering if it's possible to add Compatibility with Lost Cities and Lost Souls to prevent picking up blocks in Buildings that haven't been cleared yet.
or if it's already possible in some way, could you point me to how I would go about doing that?
This could probably be made with a script. Check the wiki page for scripting. I wrote something that might work.
{
"object":
{
"block":
{
"nbt" :
{
"haunted" : "false"
}
}
}
}
Make sure to enable scripting in the config.
That Doesn't seem to work, to make sure I was using the script properly, I tried one of the examples on the scripting page for a gold block, which worked as intended. Looking into the Lost Souls Code, It seems to give the Nbt/capability data to the Chunk itself, rather then the blocks inside the chunk. and Just blocks a player interaction event if the chunk is considered "Haunted"
Oh, I see. Yes, in that case, a script won’t work... It doesn’t look like I can do a workaround for this without having to call the function directly, which is something that I want to avoid if possible. I will read into the source a bit more and try to find a general workaround.
I think I could actually just check if the interact event is cancelled... will try that.
I think these are the Relevant Classes
https://github.com/McJtyMods/LostSouls/blob/06c82558fb9b53d196d5960e52aab2000c829149/src/main/java/mcjty/lostsouls/ForgeEventHandlers.java#L68
Looks to be Nbt data I guess