Closed chvolkmann closed 7 years ago
Can confirm the same happening to me. Also running magic storage 0.4.0.2 and tModLoader 0.10.0.2. All of the above listed mods as well.
Does the error have any more details, or is it only that one line?
Nope, that's all information the console spits out
Having the same issue. Works just fine in single player, doesnt work in multiple player. Throwing the same message as Freemanium. Running the following Mods on tModLoader 0.10.0.1 and Terraria 1.3.5.2.
I can reproduce this in a new (clean) world without any other mods enabled.
Terraria Server v1.3.5.2 - tModLoader v0.10.1 MagicStorage 0.4.2
The Storage Heart works great, in both single-player and multi-player. The Storage Crafting Interface opens and looks normal in both single-player and multi-player. But in multi-player, the "Craft" button doesn't actually craft anything. It makes the crafting noise, but no crafting happens... the new item doesn't appear and the ingredients aren't subtracted. This happens regardless of whether the recipe required a crafting station. It seems to happen for mana crystals, iron bars, everything.
[I also posted on the forum about this. Apologies for the redundancy.]
I'm getting it as well. The storage itself works fine, but like everyone else here says it's 1 line, no other errors show up in any logs. It was working just fine for probably about a week, but only a few hours after we went into Hardmode and it's broken.
Terraria Server v1.3.5.2 - tModloader v0,10.1 w/ MagicStorage 0.4.2
real exception is:
System.NullReferenceException: Object reference not set to an instance of an object
at Terraria.GameContent.UI.Elements.UIText.InternalSetText (System.Object text, System.Single textScale, System.Boolean large) [0x0002b] in <3e6851c102b24f3c9b5479ac02ec4b1e>:0
at Terraria.GameContent.UI.Elements.UIText..ctor (System.String text, System.Single textScale, System.Boolean large) [0x00071] in <3e6851c102b24f3c9b5479ac02ec4b1e>:0
at MagicStorage.CraftingGUI..cctor () [0x000fb] in <0fc9a6de5748445e9737694c16bb02e9>:0
that is getting called from List<Item> items = CraftingGUI.DoCraft(heart, toWithdraw, result);
in NetHelper.ReceiveCraftRequest()
.
CraftingGUI fails to initialize static UIText()
because
DynamicSpriteFont.MeasureString
thats used in its constructor returns null when running on dedicated server (tested on Linux).
Quick fix was to move static constructors of UIText()
to static method CraftingGUI.Initialize()
for those two variables:
private static UIText capacityText;
private static UIText reqObjText2;
Quick fix was to ...
Now if I only knew how to do that and build it 😅
Ok I got it built and crafting works on server for now so ain't complaining. 👍
Ok I got it built and crafting works on server for now so ain't complaining. 👍
@Mr-Rixa Can you share this mod? thanks a lot
@ahjsrhj Well I have very limited knowledge of coding and it was a bit hit and miss. You'll take all responsibility of what might happen if you do this. I recommend taking a manual backup of your world before doing this. (so far I've had no problems 😅)
line | code |
---|---|
change 80 | private static UIText capacityText; |
change 92 | private static UIText reqObjText2; |
and then add this after line 312
// hacky test fix that didn't lag
if (reqObjText2 == null)
{
reqObjText2 = new UIText(Language.GetText("LegacyInterface.22"));
}
if (capacityText == null)
{
capacityText = new UIText(Language.GetText("LegacyInterface.22"));
}
Like I stated earlier this was a bit hit and miss and if anybody has a better or more elegant way to fix it please correct my horrible hacky ways 😅
@Mr-Rixa Thank you very much!
@Mr-Rixa If you feel like it, you can even issue a pull request, so others can quickly import your changes.
The Crafting Terminal doesn't seem to work in multiplayer.
I pick an item, click the "Craft" button afterwards, nothing happens. The server console prints the following error message:
This feature does however work in singleplayer.
I'm running the latest version of MagicStorage (v0.4.0.2) with tModLoader v0.10.0.2 and Terraria v1.3.5.2. Additional mods are:
...although I don't suspect them to cause this issue.