Fabric Bedrock Miner

Fabric Bedrock Miner

16.5k Downloads

[1.17.1] Updated lang files and updated fabric.mod.json for 1.17.1 - Crashes upon enabling bedrock breaker

ASchneider-GitHub opened this issue ยท 2 comments

commented

I changed some of the strings in the lang file to make them less obtrusive, and updated fabric.mod.json with:

  "depends": {
    "fabricloader": ">=0.11.3",
    "minecraft": "1.17.x",
    "java": ">=16"
  },

After running gradlew build the jar builds correctly, but after right clicking bedrock with an empty hand, the game crashes with the error below:

java.lang.ClassCastException: class net.minecraft.class_2665 cannot be cast to class net.minecraft.class_1792 (net.minecraft.class_2665 and net.minecraft.class_1792 are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @141e5bef)
	at yan.lx.bedrockminer.utils.InventoryManager.getInventoryItemCount(InventoryManager.java:117)
	at yan.lx.bedrockminer.utils.InventoryManager.warningMessage(InventoryManager.java:126)
	at yan.lx.bedrockminer.utils.BreakingFlowController.tick(BreakingFlowController.java:55)
	at net.minecraft.class_636.handler$zhf003$init(class_636.java:1098)
	at net.minecraft.class_636.method_2927(class_636.java)
	at net.minecraft.class_310.method_1574(class_310.java:1698)
	at net.minecraft.class_310.method_1523(class_310.java:1081)
	at net.minecraft.class_310.method_1514(class_310.java:728)
	at net.minecraft.client.main.Main.main(Main.java:217)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

Even after doing a clean git clone [repo] and trying to build it from clean source code, the mod crashes because the fabric.mod.json file is out of date.

Can someone update the repository with the correct source code for 1.17, instead of keeping the repository on 1.16.x and releasing modified versions?

commented

Ah I found the issue. The 1.17.1 source code is in a different branch, and the structure of the mod has been changed to where lang files aren't used. Downloading the 1.17.1 branch and using gradlew build worked just fine.

commented

Please make sure to only add version stuff the the correct branch I think LXYan would like this too.