Crash on killing mobs
corentin-godefroy opened this issue ยท 42 comments
Describe the Bug
When a mob is killed by a deployer (using a sword in my tests), a crash occurs.
Reproduction Steps
- Use a deployer (horizontal in my tests)
- Apply sword an punch statement
- Power it with creative motor (256 rotation speed in my tests)
- place and block a mob in front of the deployer.
- Wait to the death
...
Expected Result
The mob is killed, and the deployer drop collected items by the funnel.
Screenshots and Videos
Video.sans.titre.Realisee.avec.Clipchamp.mp4
Crash Report or Log
(https://github.com/Fabricators-of-Create/Create/files/12508015/crash-report.txt
Operating System
Windows 11
Mod Version
0.5.1d
Minecraft Version
1.20.1
Other Mods
None
Additional Context
No response
Same issue here, equal version: Fabri Mod Version 0.5.1-d-build.1161 on MC 1.20.1
https://pastebin.com/gcWBTQ6e
Tested any direction, yields the same result.
Maybe a more permanent fix could be to introduce counting of drops captures ?
@Unique
private int capturedDropsCount = 0;
@Override
public void startCapturingDrops() {
if (capturedDropsCount == 0)
capturedDrops = new ArrayList<>();
capturedDropsCount++;
}
@Override
public List<ItemEntity> finishCapturingDrops() {
List<ItemEntity> captured = capturedDrops;
if (capturedDropsCount > 0)
capturedDropsCount--;
if (capturedDropsCount == 0)
capturedDrops = null;
return captured;
}
stack trace:
java.lang.NullPointerException: Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because "capturedDrops" is null
at com.simibubi.create.content.kinetics.deployer.DeployerHandler.activateInner(DeployerHandler.java:207)
at com.simibubi.create.content.kinetics.deployer.DeployerHandler.activate(DeployerHandler.java:134)
at com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity.activate(DeployerBlockEntity.java:358)
at com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity.tick(DeployerBlockEntity.java:244)
at com.simibubi.create.foundation.blockEntity.SmartBlockEntityTicker.tick(SmartBlockEntityTicker.java:15)
Temporary fix, at minimum to prevent the game from crashing ?
List<ItemEntity> capturedDrops = entity.finishCapturingDrops();
if (capturedDrops != null) capturedDrops.forEach(e -> player.getInventory()
The first fix just causes the game to crash when the deployer deals any damage to a mob. Where would I put the code for the second fix?
Thanks for your feedback. Closing the PR #1121 for the first proposal since it's obviously not good enough.
I was thinking about entity/src/main/java/io/github/fabricators_of_create/porting_lib/entity/mixin/EntityMixin.java for the second approach. But I didn't test it yet...
can confirm @fabien-gigante's solution works, I can now build an automated blaze rod farm in peace.
Any sort of ETA on the release with this fix going out? I'm also perfectly happy pulling the project down and compiling it myself if anyone is able to tell me where I should place the fix that fabien-gigante has.
@paulwsully feel free to use the version we've compiled for use on our server: https://dl.x64.icu/mc_packs/DrakeServ2/mods/create-fabric-0.5.1-d-localmc1.20.1.jar This also contains fixes for issues #1134 and #1080
Any sort of ETA on the release with this fix going out? I'm also perfectly happy pulling the project down and compiling it myself if anyone is able to tell me where I should place the fix that fabien-gigante has.
Checkout the PR:
- Fabricators-of-Create/Porting-Lib#64
- run
./gradlew build
- take the
Porting-Lib/entity/build/libs/porting_lib_entity-2.1.99999+comined.jar
, rename it toentity-2.1.1127+1.20.jar
and replace the one contained increate-fabric-0.5.1-d-build.1161+mc1.20.1.jar/META-INF/jars
@paulwsully feel free to use the version we've compiled for use on our server: https://dl.x64.icu/mc_packs/DrakeServ2/mods/create-fabric-0.5.1-d-localmc1.20.1.jar This also contains fixes for issues #1134 and #1080
Using this prevents create addon mods from working, any reason for this?
Are they going to fix it? people write about some temporary solutions and I don't understand, do I need to get into the game code myself and change my mod to fix this or what? help
Are they going to fix it? people write about some temporary solutions and I don't understand, do I need to get into the game code myself and change my mod to fix this or what? help
Download the version that is attached there, it already contains the required fix and its working perfectly fine on my server/for my friends and me:
Using this prevents create addon mods from working, any reason for this?
I'm using my self compiled version with those fixes with addons just fine.
What are you refering to with "prevent"? An error or a bug? Which addons are you trying to use?
Using this prevents create addon mods from working, any reason for this?
I'm using my self compiled version with those fixes with addons just fine. What are you refering to with "prevent"? An error or a bug? Which addons are you trying to use?
Sorry different user and different tangent - first of all thanks for compiling the fix! It does indeed fix the crash issue but I observed that now the deployers don't create experience when killing mobs :( anymore. Regular drops are created/collected correctly though.
now the deployers don't create experience when killing mobs :( anymore.
Did they ever? There is a separate mod/addon for that: Create Enchantment Industries.
I have it running on my server and the exp orbs get generated perfectly fine.
Using this prevents create addon mods from working, any reason for this?
I'm using my self compiled version with those fixes with addons just fine. What are you refering to with "prevent"? An error or a bug? Which addons are you trying to use?
Dang thanks for replying so fast. Currently it crashes on startup, and says that create deco does not work with the compiled version. For reference the only thing I am changing is going from Create create-fabric-0.5.1-d-build.1161+mc1.20.1 to your compiled version.
Currently it crashes on startup, and says that create deco does not work with the compiled version.
Do you have a stracktrace?
Do you have a stracktrace?
Incompatible mods found!
net.fabricmc.loader.impl.FormattedException: Some of your mods are incompatible with the game or each other!
A potential solution has been determined, this may resolve your problem:
- Replace mod 'Create Deco' (createdeco) 2.0.0-fabric-1.20.1 with any version that is compatible with:
- create 0.5.1-d-local+mc1.20.1
More details:
- Mod 'Create Deco' (createdeco) 2.0.0-fabric-1.20.1 requires version 0.5.1-d-build.1161+mc1.20.1 of mod 'Create' (create), but only the wrong version is present: 0.5.1-d-local+mc1.20.1!
- Mod 'Carpet TCTC Addition for 1.14.4' (carpet-tctc-addition-1_14_4) 2.2.208+0fb0eb0-stable requires any 1.14.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.14.4' (magiclib-1_14_4) 0.7.398+fe2125a-stable requires any 1.14.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.15.2' (carpet-tctc-addition-1_15_2) 2.2.208+0fb0eb0-stable requires any 1.15.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.15.2' (magiclib-1_15_2) 0.7.398+fe2125a-stable requires any 1.15.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.16.5' (carpet-tctc-addition-1_16_5) 2.2.208+0fb0eb0-stable requires any 1.16.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.16.5' (magiclib-1_16_5) 0.7.398+fe2125a-stable requires any 1.16.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.17.1' (carpet-tctc-addition-1_17_1) 2.2.208+0fb0eb0-stable requires any 1.17.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.17.1' (magiclib-1_17_1) 0.7.398+fe2125a-stable requires any 1.17.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.18.2' (carpet-tctc-addition-1_18_2) 2.2.208+0fb0eb0-stable requires any 1.18.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.18.2' (magiclib-1_18_2) 0.7.398+fe2125a-stable requires any 1.18.x version of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.19.2' (carpet-tctc-addition-1_19_2) 2.2.208+0fb0eb0-stable requires any version between 1.18.2 (exclusive) and 1.19.2 (inclusive) of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.19.2' (magiclib-1_19_2) 0.7.398+fe2125a-stable requires version 1.19.2 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.19.3' (carpet-tctc-addition-1_19_3) 2.2.208+0fb0eb0-stable requires version 1.19.3 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.19.3' (magiclib-1_19_3) 0.7.398+fe2125a-stable requires version 1.19.3 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.19.4' (carpet-tctc-addition-1_19_4) 2.2.208+0fb0eb0-stable requires version 1.19.4 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.19.4' (magiclib-1_19_4) 0.7.398+fe2125a-stable requires version 1.19.4 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Carpet TCTC Addition for 1.20.2' (carpet-tctc-addition-1_20_2) 2.2.208+0fb0eb0-stable requires version 1.20.2 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.20.2' (magiclib-1_20_2) 0.7.398+fe2125a-stable requires version 1.20.2 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'Fastload Fabric-api Forwarding' (fastload_fapi_forward) 1.0.2 requires version 1.19.4 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
- Mod 'MagicLib for 1.20.4' (magiclib-1_20_4) 0.7.398+fe2125a-stable requires version 1.20.4 of 'Minecraft' (minecraft), but only the wrong version is present: 1.20.1!
at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:51)
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:195)
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:146)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
@Athae1218 You see the mod resolver window because Create Deco depends on the exact version of official Create. You can override it using a Fabric Dependency Override. talrey/CreateDeco#105 (comment)
I used the official version and just replaced the related files, maybe that saves you from changing other stuff.
create-fabric-0.5.1-d-build.1161+mc1.20.1-patched2.jar.zip
- Download the zip
- Unpack it/extract the jar from the zip
- Replace the original create.jar with the patched one
Can you explain how to put this code in minecraft to someone who doesnt understand anything about code?
If you don't understand anything about code, please use one of the community provided jars with the fix:
- Here is mine: #1096 (comment)
If you don't trust jars from strangers (which is a good attitude in general), then:
- Download and install git(-scm), Java 17 JDK, and a zip application such as 7zip.
- And then follow the instructions here: #1096 (comment)
Maybe a more permanent fix could be to introduce counting of drops captures ?
@Unique private int capturedDropsCount = 0; @Override public void startCapturingDrops() { if (capturedDropsCount == 0) capturedDrops = new ArrayList<>(); capturedDropsCount++; } @Override public List<ItemEntity> finishCapturingDrops() { List<ItemEntity> captured = capturedDrops; if (capturedDropsCount > 0) capturedDropsCount--; if (capturedDropsCount == 0) capturedDrops = null; return captured; }
Hi,
Can you explain how to put this code in minecraft to someone who doesnt understand anything about code?
I tried serveral things but i just cant seem to mae it work.
It would help me and my friends is the server a lot!
Can you explain how to put this code in minecraft to someone who doesnt understand anything about code?
If you don't understand anything about code, please use one of the community provided jars with the fix:
- Here is mine: Crash on killing mobs #1096 (comment)
If you don't trust jars from strangers (which is a good attitude in general), then:
- Download and install git(-scm), Java 17 JDK, and a zip application such as 7zip.
- And then follow the instructions here: Crash on killing mobs #1096 (comment)
Hi thanks for willing to help!
But i still dont understand....
The file you made doesnt work on our server. We have a similair file but it is named. Create-SODIUM-fix and not fabric fix.
But i donwloaded all the things you commented but i dont know what to do now. the introductions are not cleare for me on that comment you sent me to. Maby just maby can you make it even easyer? Im sorry if this is annoying but i want it to work soo bad. If you dont want to its fine!.
Thanks a lot in advance!
The file you made doesnt work on our server.
Did you extract the jar from the zip?
What exactly did not work.
We have a similair file but it is named...
My jar has just the patch suffix appended to the original filename. Where did you download your version of create?
(Any compile instructions would result in the same issue, so I'm not expanding on those for now)
The file you made doesnt work on our server.
Did you extract the jar from the zip? What exactly did not work.
We have a similair file but it is named...
My jar has just the patch suffix appended to the original filename. Where did you download your version of create?
(Any compile instructions would result in the same issue, so I'm not expanding on those for now)
Hi thanks again for the fast response
I myself did not make the modpack but we use this version of create:
https://modrinth.com/mod/create-fabric-sodium-fix
And i did extract the file from the zip it just did nothing. the game still crashes. I looked at it with a friend who understands mods more then i do and he said that i added it the right way. but i think it is because we dont have the normal create.
thanks again for helping!
Then you should probably ask that mod author to include the fix (Please link to this issue for better communication).
Alternatively, try replacing the create-sodium-fix.jar/META-INF/jars/entity-2.1.1127+1.20.jar
with the one in my jar.
If that doesn't work, try (with a fresh copy) replacing only create-sodium-fix.jar/META-INF/jars/entity-2.1.1127+1.20.jar/io/github/fabricators_of_create/porting_lib/entity/mixin/EntityMixin.class
(fix for this issue) + .../porting_lib/transfer/item/ItemStackHandlerSlot.class
(fix for another issue) with the one from my jar.
Or wait and hope that the following PR fixes the issue as well:
@paulwsully feel free to use the version we've compiled for use on our server: https://dl.x64.icu/mc_packs/DrakeServ2/mods/create-fabric-0.5.1-d-localmc1.20.1.jar This also contains fixes for issues #1134 and #1080
I tried your fixed version and it did fix the crash when the robot killed a mob. But it is still not compatible with sodium, can you integrate it for repair?
@Akaincaps AFAICT you are using an unofficial fork that uses the updated sodium version, please report any issues with the fork there and maybe include a link to this issue so it is easier for them to lookup the fix.
@ST-DDT hey i was just reading the comments on the issue and i downloaded https://github.com/Fabricators-of-Create/Create/files/13728069/create-fabric-0.5.1-d-build.1161%2Bmc1.20.1-patched2.jar.zip , but I still don't know where to put it; do i just change the create jar for that one?
do you realize a jar file is already a zip file?
I would have uploaded just that if github would have let me.
I updated the instructions.
Yes,
- download the zip,
- unzip it/extract the jar from it,
- replace the original create jar with the patched one.
do you realize a jar file is already a zip file?
I would have uploaded just that if github would have let me.
Just open the zip as a text file, then save it as a txt and send it here
Btw for anybody using the "Create Fabric Sodium Fix" by Treetrain1, I've compiled that .jar with the swapped out entity-2.1.1127+1.20.jar to fix the problem. Below is my .jar file which you can simply extract and swap out with your "create-sodium-fix-0.5.1-d-build.5+mc1.20.1.jar" and it should fix the problem!
Fixed in: #1289