#Help with debugging an IllegalAccessError

1 messages · Page 1 of 1 (latest)

versed briar
#
java.lang.IllegalAccessError: class com.themysterys.radar.RadarClient tried to access private method 'net.minecraft.class_2561 net.minecraft.class_8113$class_8123.method_48915()' (com.themysterys.radar.RadarClient and net.minecraft.class_8113$class_8123 are in unnamed module of loader 'knot' @429bd883)

Code in question:
String text = textDisplay.getText().getString(Integer.MAX_VALUE);

#

Version: 1.21.1 using Mojang mappings
Fabric loader: 0.16.9

Fabric api 0.103.0+1.21.1

versed briar
rocky phoenix
#

what exactly needs debugging here

#

I'm holding my hand over the !!learnjava button rn, that message is just telling you that getText is a private method

versed briar
#

Ngl I’m more surprised that this has been working for so long in a live version of my mod that I never realised that getText was private

#

Like updating fabric API to something more recent basically stops this from happening (probably why I never noticed sooner) but also made it way more confusing

#

easy enough fix though