Kir-Antipov / sync-fabric

One mind. Many bodies.
MIT License
17 stars 13 forks source link

[Crash] on player inside the constructor #36

Open No3371 opened 1 year ago

No3371 commented 1 year ago

What were you doing when the crash occured?

This is actually not a bug IMO...

You know there are mods like Carry On allowing players pick up entities. I was messing around and accidentally picked up the Shell Constructor with a new shell in it, and the top half of that thing just shattered. When I put that down, it remains broken, with the shell still in it.

And I start messing with it again and at the moment I jumped in that broken Constructor the game crashed, and always crash whenever I entered the world... I guess the Constructors are doing something to the entities in it?

I was just playing around my mod pack so I'm totally fine with it, just letting you know there's a way to blow it up.

Did the crash occur client-side or server-side?

Client

Version

1.19.1-4.3

Minecraft Version

1.19.1-4.3

Fabric API Version

0.14.14

Installation Source

CurseForge

Logs

[22:23:40] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.class_148: Ticking block entity
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) ~[client-intermediary.jar:?]
    at net.minecraft.class_1132.method_3748(class_1132.java:98) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[client-intermediary.jar:?]
    at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: Cannot set property class_2746{name=open, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{minecraft:air}
    at net.minecraft.class_2688.method_11657(class_2688.java:117) ~[client-intermediary.jar:?]
    at dev.kir.sync.block.AbstractShellContainerBlock.setOpen(AbstractShellContainerBlock.java:72) ~[sync-mc1.19.1-4.3.jar:?]
    at dev.kir.sync.block.entity.ShellConstructorBlockEntity.onServerTick(ShellConstructorBlockEntity.java:35) ~[sync-mc1.19.1-4.3.jar:?]
    at dev.kir.sync.block.entity.TickableBlockEntity.serverTicker(TickableBlockEntity.java:17) ~[sync-mc1.19.1-4.3.jar:?]
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:660) ~[client-intermediary.jar:?]
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:714) ~[client-intermediary.jar:?]
    at net.minecraft.class_1937.method_18471(class_1937.java:456) ~[client-intermediary.jar:?]
    at net.minecraft.class_3218.method_18765(class_3218.java:376) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) ~[client-intermediary.jar:?]
    ... 5 more

Other Mods

Sorry but maybe not because it's a fresh pack of 520 mods.

Additional Information

No response

No3371 commented 1 year ago

BTW, since I already made a issue, hope you don't mind me sharing a thought: The mod is pretty cool and is never designed to be a balanced one. With a configurable printing material system, it could be balanced, like... require players provide food and fill a food value threshold for every shell.

Kir-Antipov commented 1 year ago

Thank you for the notice! There are two problems:

1) The "Carry On" mod does not support block entities (or tile entities, if you wish) consisting of two or more blocks 2) I didn't bother to implement fail checks during ticking, because I assumed that in cases where the game tries to tick an air block (or anything like that) as a shell container, it's already broken beyond repair, so it may be a good idea to just let it crash for good

I'll leave this issue open, because I feel like I need to reconsider my approach here, since this is a second issue of such kind :D


Since you are a modpack developer, I highly recommend disabling the ability to pick up any shell containers ("Carry On" has a config entry for that).


The mod is pretty cool and is never designed to be a balanced one. With a configurable printing material system, it could be balanced, like... require players provide food and fill a food value threshold for every shell.

Yeah, you are right, the mod is not created to be the most balanced one out there, but I feel that configurable amount of health and energy a player must spend on a single shell is already the best we can squeeze from it.

No3371 commented 1 year ago

Oh, so the crash comes from the missing upper half getting ticked, that explains it! I thought it crashed because I was in there with the shell. (It didn't crash and nothing was happening until I jumped in the Constructor)

I'd say it's OK to leave it "unfixed", because whoever using mods like Carry On already know that most entities are not designed to be picked up. But ofc it's also good if you want to prevent further issues for this.

Anyway, so far so good, It's already working surprisingly better than I expected, because the last time I tried Sync is so many years ago, and it was not very compatible with other mods.

Leaving this to you.