MineColonies

MineColonies

65M Downloads

Game crashes upon interacting with Farm Block

pemabr opened this issue ยท 11 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.20

MineColonies Version

1.20.1-1.1.846

Structurize Version

1.20.1-1.0.767

Related Mods and their Versions

  1. Forge Version 47.4.0
  2. BlockUI Version 1.20.1-1.0.187

Current Behavior

When I click on the Farm Block to enter its UI, the game crashes.

Expected Behavior

When I click on the Farm Block to enter its UI, the UI opens.

Reproduction Steps

  1. Place a minecolonies farm block.
  2. Click on the minecolonies farm block to interact with its UI.

Logs

https://gist.github.com/pemabr/0a5ad43c1f877bf3cb09c1920546d696

Anything else?

This is caused by a change in MineColonies Version 1.20.1-1.0.187 where the Farm Blocks UI was overhauled and the east,west, north, south buttons where changed. their image sources now point to files in minecolonies:buildings. This directory however does not exist.

Footer


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

To give more information:

  • you click on the farm block
  • blockUI function createFromXMLFile is executed on windowfarm.xml

windowfarm.xml has code that looks like this (on line 21 onward):
<button id="dir-resize-north" size="24 24" pos="129 45" color="white" textalign="MIDDLE" source="minecolonies:building/scarecrow/north" highlight="minecolonies:building/scarecrow/north/light" disabled="minecolonies:building/scarecrow/north/dark"/> <button id="dir-resize-south" size="24 24" pos="129 93" color="white" textalign="MIDDLE" source="minecolonies:building/scarecrow/south" highlight="minecolonies:building/scarecrow/south/light" disabled="minecolonies:building/scarecrow/south/dark"/> <button id="dir-resize-west" size="24 24" pos="105 69" color="white" textalign="MIDDLE" source="minecolonies:building/scarecrow/west" highlight="minecolonies:building/scarecrow/west/light" disabled="minecolonies:building/scarecrow/west/dark"/> <button id="dir-resize-east" size="24 24" pos="153 69" color="white" textalign="MIDDLE" source="minecolonies:building/scarecrow/east" highlight="minecolonies:building/scarecrow/east/light" disabled="minecolonies:building/scarecrow/east/dark"/>

The folder minecolonies/building does not exist in the jar file (at least not where i would expect it to be). I think the source was either not added or not referenced properly but this is just an educated guess made under the consideration of java.io.FileNotFoundException: minecolonies:building/scarecrow/north.

The mentioned sources however have no file extention, wich gives us java.lang.IllegalStateException: No extension for file: minecolonies:building/scarecrow/north

This all leads to java.lang.RuntimeException: Can't parse xml at: minecolonies:gui/windowfield.xml wich in turn is an Unreported exception thrown! and exits the game.

For anyone brave enough to do a quick and dirty fix on their machine: exchanging the mentioned code with:

<button id="dir-resize-north" size="24 24" pos="129 45" color="white" textalign="MIDDLE" source="minecolonies:textures/gui/red_wax_arrow_up.png" highlight="minecolonies:textures/gui/red_wax_arrow_up.png" disabled="minecolonies:textures/gui/red_wax_arrow_up.png"/> <button id="dir-resize-south" size="24 24" pos="129 93" color="white" textalign="MIDDLE" source="minecolonies:textures/gui/red_wax_arrow_down.png" highlight="minecolonies:textures/gui/red_wax_arrow_down.png" disabled="minecolonies:textures/gui/red_wax_arrow_down.png"/> <button id="dir-resize-west" size="24 24" pos="105 69" color="white" textalign="MIDDLE" source="minecolonies:textures/gui/red_wax_arrow_left.png" highlight="minecolonies:textures/gui/red_wax_arrow_left.png" disabled="minecolonies:textures/gui/red_wax_arrow_left.png"/> <button id="dir-resize-east" size="24 24" pos="153 69" color="white" textalign="MIDDLE" source="minecolonies:textures/gui/red_wax_arrow_right.png" highlight="minecolonies:textures/gui/red_wax_arrow_right.png" disabled="minecolonies:textures/gui/red_wax_arrow_right.png"/>

exchanges the missing pictures by the known and loved wax arrow. Don't take my word for it though as i have not tested this change myself.

commented

Thank you. Great mod by the way and great work.

commented

SO wait how did u fix it? will there be an update on curseforge or should I fix it as pemabr said my self?

commented

there will be an update on cf in the next 15 minutes

commented

Hey here is the same problem adding my log

https://gist.github.com/Zabadaj/99feb2bec1d5b58b82022664de0dab12

commented

Additionally latest version of structurize has a problem for me it kicks me from server when I try to click with build tool with this message : "Zabadaj lost connection: Internal Exception: java.lang.NullPointerException: Cannot read field "renderPlaceholdersNice" because the return value of "com.ldtteam.structurize.config.Configuration.getClient()" is null"

commented

We do not support using Minecolonies tweaks, remove that mod might fix it already

commented

It does still crash without any other not required mods.
https://gist.github.com/pemabr/23348e22de67b64341adebdc3cd0b70e

commented

Try and update BlockUI please

commented

the test without tweak i did was with blockUI 1.0.190 . that is the newest snapshot for 1.20.1 and as of now less then 2 hours old.

The stacktrace suggests, that it cannot find the sources of the north west east south buttons. I did not find the corresponding file. might want to look into that.

edit: I did the corresonding file. -> I did not find the corresponding file.

commented

latest.log

Can confirm that game crashes when I select the scarecrow block.. 1.20.1 - 1.1.847-snapshot