Create Fabric

Create Fabric

11M Downloads

Crash when using the Train Station when Caxton is installed

bluebear94 opened this issue · 5 comments

commented

Describe the Bug

When Caxton is installed, using the Train Station results in a crash (issue on Caxton’s repository).

Reproduction Steps

  1. Create a new world
  2. Place a Train Track and a Train Station next to it
  3. Right-click on the Train Station

Expected Result

The train station screen should open.

Screenshots and Videos

No response

Crash Report or Log

https://mclo.gs/7i9WjgN

Operating System

Linux

Mod Version

0.5.1d

Minecraft Version

1.20.1

Other Mods

  • Caxton: 0.5.3+1.20.1-FABRIC
  • Create IThundxr-Modding/Create-Fabric@3b15a0c was actually used to be usable in a Yarn dev env

Additional Context

This bug is caused by an interaction between Caxton and the NoShadowFontWrapper class, as Caxton requires access to many of Font’s internals.

One of the underlying problems (trying to get a StringSplitter from the wrapper before it was fully initialized) has been fixed in a later commit.

The other problem is that Caxton expects the first parameter of the Font constructor to be non-null. I think this is easier to fix from Create’s side than Caxton’s, though it does require an accessor to get the fonts field from the wrapped Font.

commented

Running the same mods on Forge 47.2.0 I got similar results.
This is probably an upstream issue from Create or Caxton and is not in the scope of this project to fix.

commented

Fair enough; I predicted that this would affect the Forge versions, too, but only tested with Fabric so far.

commented

Seems like caxtons issue, they should be null checking stuff

commented

Actually, I realized that I could use Font#getFontSet instead of accessing the Font#fonts field directly. Definitely easier than mixing into NoShadowFontWrapper.