Closed LangYueMc closed 2 weeks ago
The porting lib needs to be consistent with create fabric, otherwise it will be incompatible.
And LogicalSidedProvider.WORKQUEUE.get(EnvType.SERVER).isSameThread()
will be NPE
, need to be replaced with !LogicalSidedProvider.WORKQUEUE.get(EnvType.CLIENT).isSameThread()
src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/common/gui/BackpackContainer.java
@Override
protected boolean shouldSlotItemBeDroppedFromStorage(Slot slot) {
return !LogicalSidedProvider.WORKQUEUE.get(EnvType.CLIENT).isSameThread() && slot.getItem().getItem() instanceof BackpackItem &&
!storageWrapper.getInventoryHandler().isItemValid(0, slot.getItemVariant());
}
Added !LogicalSidedProvider.WORKQUEUE.get(EnvType.CLIENT).isSameThread()
because if executed by the client, it will cause false movement of items.
Porting lib loot has a lot of bugs, and the latest version conflicts with create. IMHO, the version management mechanism of Porting lib is terrible, so I gave up using it and switched to fabric api.
https://github.com/LangYueMc/SophisticatedBackpacks/commit/b940a56256d8a12d92bbe89439a4ad0e8323f5de
Hey sorry for the late reply, I somehow did not notice this issue until now.
I want to get away from porting-lib, as soon as 1.20.1, in 1.19.4 it's not an issue as create was never released for that version, but it was a good way to start the port and get it running.
About your second comment, I also had some problems with this in server environments and opted to change it completely.
I'll have a look at fabrics loot injection system. Thanks for the tip.
错误报告-2024-4-30_10.58.03.zip Fabric Error -> fabric-loader-0.15.9
@Atlantis520 please update sodium, version 0.4.10 is not supported in the 1.20.1 version of this mod
ETA on the fix?
What fix?
Create compatibility fix. There are some forks which fix it by replacing the porting thing with fabric api but I can't get any of them to compile and from what I can see they aren't on curse forge or modrinth
never mind? i switched to modrinth and everything is working now??
Hello, I forked the code and upgraded to 1.20.1.
https://github.com/LangYueMc/SophisticatedWorkspace
The reason for submitting an issue instead of a PR is because I have not use the streamlined porting lib that you have modified. I think there will be problems with direct PR, so I will record the problems encountered in the upgrade in this issue.
Also, can I distribute it on forums in China for testing?