Create Jetpack

Create Jetpack

10M Downloads

Hello, about mod crashing on 0.5.1h in Create

xiaojuzi122 opened this issue · 14 comments

commented

What happened?

Create Jetpack is version 4.2.1, Create version is 0.5.1h, right-clicking when the backpack is inflated will cause the game to crash (whether it is the client or the server side), and there is no problem with Create downgrading to 0.5.1f

Loader

forge

Mod Version

4.2.1

Minecraft Version

1.20

Relevant log output

No response

commented

I show it after entering This folder was not found

commented

Is there a solution?

commented

I've been in a similar situation. This is the server crash is the output of information about this mod

[19:06:36] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
java.lang.NoSuchMethodError: 'net.minecraft.nbt.ListTag com.simibubi.create.content.equipment.armor.BacktankBlockEntity.getEnchantmentTag()'
at com.possible_triangle.create_jetpack.block.JetpackBlock$getCloneItemStack$enchants$1.invoke(JetpackBlock.kt:27) ~[create_jetpack-forge-4.2.1.jar%23270!/:4.2.1]
at com.possible_triangle.create_jetpack.block.JetpackBlock$getCloneItemStack$enchants$1.invoke(JetpackBlock.kt:27) ~[create_jetpack-forge-4.2.1.jar%23270!/:4.2.1]
at com.possible_triangle.create_jetpack.block.JetpackBlock.getCloneItemStack$lambda$1(JetpackBlock.kt:27) ~[create_jetpack-forge-4.2.1.jar%23270!/:4.2.1]
at java.util.Optional.map(Optional.java:260) ~[?:?]
at com.possible_triangle.create_jetpack.block.JetpackBlock.m_7397_(JetpackBlock.kt:27) ~[create_jetpack-forge-4.2.1.jar%23270!/:4.2.1]
at com.simibubi.create.content.equipment.armor.BacktankBlock.m_6227_(BacktankBlock.java:172) ~[create-1.20.1-0.5.1.h.jar%23268!/:0.5.1.h]
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:779) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.level.ServerPlayerGameMode.m_7179_(ServerPlayerGameMode.java:483) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6371_(ServerGamePacketListenerImpl.java:1574) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:34) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:8) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:25) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:151) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:1026) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:174) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:124) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:1009) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:1003) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:112) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:988) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:911) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:284) ~[server-1.20.1-20230612.114412-srg.jar%23322!/:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]

commented

Just same issue as JadeAddon, you can learn from it

commented

I found the reason:

CREATE's recent update removed the function "getEnchantmentTag()" in Class "BacktankBlockEntity".

Screenshot_2024-09-05_23-00-49

In fact, they removed variable "enchantmentTag" as well.

Screenshot_2024-09-05_23-00-49

commented

So how do we solve this

commented

Many changes happened in the class "src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java", espacially the function "getCloneItemStack()".

Screenshot_2024-09-06_00-13-32

This mod rewrites the function "getCloneItemStack()" in "src/main/kotlin/com/possible_triangle/create_jetpack/block/JetpackBlock.kt", and this rewriting is now not compatible with the new "getCloneItemStack()" function in Create.

Screenshot_2024-09-06_00-13-59

If repairing the rewriting and let it compatible with new Create function again then this bug can be fixed. But I don't know how to use Kotlin 😂.

commented

That means we still have to wait for the developers to fix it, right...?

commented

It seems so....
But anyway, We have found the reason.

commented

Hi, I have fixed this bug in my forked repository, hope this will not cause other problems...

The mod file are also built, you can replace the old version of this mod temporarily. See https://github.com/theLittleStone/CreateJetpack/releases/tag/4.2.1-bugfix1.

The pull request has also been submitted to the to the original repository.

commented

Thank you, I will try it later

commented

Use the latest version 5.3.1 of JadeAddons, they fixed this problem several days ago.

commented

嗨,我已经修复了我 forked 仓库中的这个 bug,希望这不会造成其他问题......

mod 文件也构建好了,你可以临时替换这个 mod 的旧版本。请参阅 https://github.com/theLittleStone/CreateJetpack/releases/tag/4.2.1-bugfix1。

拉取请求也已提交到 to the original repository。

emmm, I tested it, and it's fine, but my jade can't see the name of the jetpack

commented

There is a new version for all supported minecraft version which should work with the newest create release