Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
cpw

[79.25] Spawn protection is reset if the world isn't properly saved (due to a crash)

6 posts in this topic

Have you read, understood, and followed all of the rules listed in large text at the top of the support forum? (Yes/No): Yes

Answering "no" to the above question will result in your post being deleted.

 

TFC Version #: 79.25

Forge Version #:  custom and 1541.

Please note that an actual number must be provided for both of the above fields.

Simply saying "current" or "latest" will result in your post being locked, due to the fact that in a large number of cases, users who say they are using the "latest" or "current" version are actually using an outdated version.

 

SSP/SMP (SinglePlayer/MultiPlayer): SSP

 

Have you deleted your config files or are using default configs and are still able to reproduce this bug? (Yes/No): Default

If you answered no to the above question, delete all 3 TFC config files (TFCCrafting, TFCConfig, TFCOre), do NOT edit or add to any of the files, and try to reproduce the bug.

This question is here because many bugs are caused by mistakes in config files. If you are unable to delete your edited config files, please provide a list of the config options you have changed.

 

Do you have any mods other than Forge and TFC installed? (Yes/No): yes

If yes, which mods? a bunch of TFC addons, Inventory Tweaks

 

If you have Optifine or Cauldron installed, can you still reproduce the bug after uninstalling them? (Yes/No): N/A

If you answered no to the above question, uninstall Optifine/Cauldron and try to reproduce the bug.

Both Optifine and Cauldron edit the base classes of forge that TFC uses. Because of this, we cannot officially support any issues that happen only when these mods are installed. In the majority of cases, TFC is not causing the bug; Optifine/Cauldron is and TFC can do nothing to fix it.

All bug reports should have an answer of "Yes" to this question. If you refuse to uninstall Optifine/Cauldron, and cannot reproduce the bug when the mods are not installed, do not bother making a bug report, as it will be locked and ignored.

 

Pastebin.com link of the Crash Report: Not available

Description:

The spawn protection is resetting to zero? if there is a crash in the server thread. This can be caused by having Inventory tweaks on, and trying to shift-click a bunch of sticks into the forge. This causes InvTweaks to enter an infinite loop, which means I need to manually kill MC.

When I manually kill MC in this circumstance, the spawn protection is reset to almost zero. I think it's because the chunk "visited" time is not the same as the current world time (level.dat is saved at a different time to the chunk region file, and your spawn protection calculation is predicated on the

consistency of those two values. I suspect you might need to track it as a flag on the chunk rather than relying on the chunk save time, since after a crash, the chunk save time might not be what you expect.

Very frustrating little bug. Means that if I accidentally shiftclick whilst doing work in my workshop, the spawn protection resets and I can't go anywhere for a while.

OK. Tested my hypothesis and recreated 100%. Here's an imgur album. 2 screenshots. One taken before I triggered the crash, and one after.

http://imgur.com/a/evO0X. You can see the spawn protection meter on the right of the UI. The later one shows it completely empty, not 2 hours further on in game time terms (and about 2 minutes later IRL), after the first one shows completely full.

Edited by cpw
0

Share this post


Link to post
Share on other sites

Two things I'd test. First is if your spawn protection seems to have reset, if you haven't already, try breaking and replacing meter. Sometimes it doesn't show correct value with reloading chunks. This is unlikely as you probably see it build back up, not just update. The other thing is we run inv tweaks in our pack and have never encountered or heard of that issue. I shift click a lot of sticks and sand into forge. Maybe grab our inv tweaks config. You can grab from the repo github.com/bunsan/TechNodefirmacraft they are a modified version of what Kitty had posted on here.

Edited by Bunsan
0

Share this post


Link to post
Share on other sites

By shift-click I meant "ctrl-shift-click" (copy everything of the same kind into the target inventory).

The spawn protection is gone. If I leave the area, I get mobs. It refills over about 30-40 minutes of "AFK" at my bed.

0

Share this post


Link to post
Share on other sites

Is that functionality that's specific to Inventory tweaks? I can't find any documentation on Ctrl+Shift+Click, only Shift+Double Click with an item on the cursor.

0

Share this post


Link to post
Share on other sites

Is that functionality that's specific to Inventory tweaks? I can't find any documentation on Ctrl+Shift+Click, only Shift+Double Click with an item on the cursor.

Yup. I believe so. Note: this is just a convenient way to get a "server crash" (it's a known bug in InvTweaks I believe, last I spoke with him).

The important takeaway isn't the InvTweaks bug, its that in the case of a server crash, important information (spawn protection) seems to be reset, at least in an SSP environment. In looking through the code, I suspect that the coremod tweak populating "ChunkData" isn't being fired properly. Error cases are always problematic, but it's probably good to make sure you try to handle it.

0

Share this post


Link to post
Share on other sites

I agree. I've passed this one on to Bioxx though, as I haven't really dug into the spawn protection code much myself, and I know there have been multiple commits "fixing" it in the past.

0

Share this post


Link to post
Share on other sites