TeamMidnightDust / Puddles

Adds Puddles. Compatible with any shaderpack!
MIT License
1 stars 3 forks source link

Client crash when using water bottle. #6

Closed DreadKyller closed 3 years ago

DreadKyller commented 3 years ago

When using the puddle block with a glass bottle I get the following error:

[19:52:19] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.IllegalAccessError: class eu.midnightdust.puddles.block.PuddleBlock tried to access private field net.minecraft.class_1657.field_7503
(eu.midnightdust.puddles.block.PuddleBlock and net.minecraft.class_1657 are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @1130520d)
    at eu.midnightdust.puddles.block.PuddleBlock.method_9534(PuddleBlock.java:55) ~[puddles-1.1.0.jar:?]

The code in question is https://github.com/TeamMidnightDust/Puddles/blob/ff7f0fc5046bc30ea32b2b22d254afdf99cfae39/src/main/java/eu/midnightdust/puddles/block/PuddleBlock.java#L55

According to the error abilities is a private field, further supported by: https://maven.fabricmc.net/docs/yarn-1.17.1+build.1/net/minecraft/entity/player/PlayerEntity.html#abilities

It's likely you should be using getAbilities() which is public, as shown: https://maven.fabricmc.net/docs/yarn-1.17.1+build.1/net/minecraft/entity/player/PlayerEntity.html#getAbilities()

Motschen commented 3 years ago

Fixed in v1.2.0