Kir-Antipov / sync-fabric

One mind. Many bodies.
MIT License
18 stars 14 forks source link

[Bug] Death does not work properly #29

Open Conrad3141 opened 2 years ago

Conrad3141 commented 2 years ago

What happened?

I have a custom modpack that I have sync installed for, and all I am using it for is for multiple origins. The problem is when you die in a body other than your original, several issues happen. 1) There is no option in config to disable losing the body 2) With KeepInventory on, items still fall on ground 3) Deathpoints are not created so it is easy to have items despawn (Xaero's Minimap) 4) I have yet to find a gravestone mod that works with sync, to mitigate previous issues.

Version

sync-mc1.18-3.1.jar

Minecraft Version

1.18.1

Fabric API Version

0.13.3

Installation Source

CurseForge

Logs

No response

Other Mods

extraorigins-1.18-9.jar
fabric-api-0.46.6+1.18.jar
FallingTree-1.18.1-3.2.1.jar
genesis-1.18.1-1.0.0.jar
heartytrinkets-1.18.1-1.0.0.jar
immersive-portals-1.2.5-mc1.18.1-fabric.jar
Immersive-portals-surivial-adaptation-0.7.0.jar
infusion-table-mod-1.0.5.jar
InventorySorter-1.8.5-1.18.jar
kleeslabs-fabric-1.18-11.0.0.jar
lambdynamiclights-2.1.0+1.17.jar
Manhunt-1.2.5+1.18.1.jar
mavm-fabric-1.18.1-1.0.7a.jar
mcw-lights-1.0.2fabric-mc1.18.1.jar
moborigins-1.8.0.jar
modmenu-3.0.1.jar
NaturesCompass-1.18.1-2.0.3-fabric.jar
Origins-1.18-1.3.2.jar
Origins-Classes-1.18-1.2.4.jar
owo-lib-0.5.2+1.18.jar
oxidized-1.6.1.jar
pandamc_concreteplus-1.9.2.jar
Patchouli-1.18.1-65-FABRIC.jar
Pehkui-3.1.0+1.14.4-1.18.1.jar
plushie-mod-1.1-1.18.1.jar
polymorph-fabric-0.0.19-1.18.1.jar
RebornCore-5.1.0.jar
rer-2.4.1.jar
RoughlyEnoughItems-7.3.443.jar
sync-mc1.18-3.1.jar
TechReborn-5.1.0.jar
trinketofundying-fabric-2.0.1-1.18.jar
trinkets-3.2.0.jar
veinmining-fabric-0.0.11-1.18.jar
waystones-fabric-1.18.1-9.0.4.jar
wthit-fabric-4.5.4.jar
Xaeros_Minimap_22.3.0_Fabric_1.18.jar
XaerosWorldMap_1.20.3.1_Fabric_1.18.jar
appleskin-fabric-mc1.18.1-2.3.0.jar
appliedenergistics2-10.0.0.jar
architectury-3.7.31.jar
axolotl-item-fix-1.1.3.jar
balm-fabric-2.4.3+0.jar
bclib-1.3.5.jar
better-end-1.0.3.jar
better-nether-6.0.12.jar
Block Magic-fabric-1.18.1-0.1.0.jar
cherishedworlds-fabric-2.0.1-1.18.jar
ChiselsBits-fabric-1.18.1-1.2.82.jar
cloth-config-6.2.57-fabric.jar
Clumps-fabric-1.18.1-8.0.0+5.jar
comforts-fabric-1.0.3-1.18.1.jar
conjuring-1.0.20+1.18.jar
Controlling-fabric-1.18.1-9.0+15.jar
creeper-spores-1.7.3.jar
elytratrinket-fabric-3.0.0-1.18.1.jar
Essential-fabric_1-18.jar
ExplorersCompass-1.18.1-2.0.2-fabric.jar
extra_classes_origins.jar
extraalchemy-fabric-1.18.1-1.7.0.jar

Additional Information

(Modpack is published on CurseForge as Sunken Origins By Neverendar if you want to easily recreate any issues)

Kir-Antipov commented 2 years ago

There is no option in config to disable losing the body

I didn't quite get this one, could you elaborate, please?


With KeepInventory on, items still fall on ground

I know, this is explicitly coded behavior. At first I did the same thing iChun's Sync did too - I completely forgot about keepInventory being a thing. Therefore, dying as a shell with keepInventory true caused complete loss of items - they didn't drop, they didn't transfer to your old body, they just ceased to exist

Ironic

Because it's impossible to reliably merge two different inventories (imagine that you died with inventory full of cobblestone and now you are being synced with another shell whose inventory is full of dirt), I force Minecraft to drop your belongings in order to save them from vanishing

https://github.com/Kir-Antipov/sync-fabric/blob/094d78cf6ae36e0bfb24688eed549d1f2503fee6/src/main/java/dev/kir/sync/mixin/PlayerEntityMixin.java#L37-L43


Deathpoints are not created so it is easy to have items despawn (Xaero's Minimap)

I have yet to find a gravestone mod that works with sync, to mitigate previous issues.

This mod's goal is to save you from actually dying, so Minecraft does not see shell death the same way as player death. Therefore, in these cases a closer integration with the given mods is needed. While I can do literally nothing with Xaero's Minimap (their mods are ARR), I can make some "shell death api" which can be used by this kind of mods, and add support for one popular gravestone mod via it as an example.


TL;DR - This is just how things work

Conrad3141 commented 2 years ago

Sorry, lost my github password, For the first question, on my server, I have a bug where the body you start with can respawn normally when there are still active shells available, but shells when in use are deleted when they die, except we also have 1 glitched shell which is not deleted on death. I'd like to just be able to always respawn normally using a config, and just be able to use the mod to switch shells. 2) I am not using this mod to prevent death, just to be able to switch origins and inventories for various purposes and to prevent burnout from always using the same mechanics. Thank you.