thexaero / open-parties-and-claims

Minecraft mod that adds chunk claims and player parties
https://www.curseforge.com/minecraft/mc-mods/open-parties-and-claims
Other
33 stars 14 forks source link

Create train conductors are not protected against taking off train schedule #487

Open Noire86 opened 2 weeks ago

Noire86 commented 2 weeks ago

Hello! When Create trains are inside the protected chunk - any player may take off the conductors' train schedule, actually ruining the set up train scheme.

Steps to reproduce:

Key notes:

Thanks in advance!

thexaero commented 1 week ago

Thanks for reporting!

thexaero commented 2 days ago

So strange how I need to spam click the conductor to reproduce this. Was it the same for you?

Noire86 commented 2 days ago

Not really, single right-click i s enough to put off the schedule from conductor. Are you sure you are not using Blaze Burner?

Noire86 commented 2 days ago

I tried to upload a video of bug reproducing, but its sad that Github does not allow to upload video with more than 10mb of weight

thexaero commented 2 days ago

For me giving a conductor a schedule only works if I spam right click. Taking it works first try though.

thexaero commented 2 days ago

I think it's because I'm currently on 1.18.2. Anyway, I've noticed that there is just so much weird stuff going on with the forge event EntityInteractSpecific that they're using. It's absolutely broken on 1.18.2. It's not fired correctly, at the wrong time and with the wrong arguments. Looks fixed on newer forge versions, but I haven't tested it yet. What MC version are you using?

thexaero commented 2 days ago

Oh, wait, it was fixed on 1.18.2 too. Let me see what I can do with this now.

thexaero commented 2 days ago

Alright, seems to be completely fixed when using 40.2.5 or newer on 1.18.2. I'll go check how other MC versions are affected.

Noire86 commented 2 days ago

I'm using Forge 1.20.1, by the way

thexaero commented 2 days ago

From looking at the 1.20.1 code, there should be no issue, but I haven't got to testing it yet.

thexaero commented 1 day ago

Alright, entity interaction protection works fine on 1.20.1 too for me. Are you sure the entity you're interacting with doesn't have a non-attack interaction exception? What mob specifically are you using?

Noire86 commented 1 day ago

You can use any animal, or Steam N Rails conductor guy.

Just seat them in front of train controls, and grant a schedule.

thexaero commented 1 day ago

I'm doing that obviously. Who are you yourself using specifically?

Noire86 commented 1 day ago

Also, grant a bypass for create:contraption_carriage to allow players interact with seats

Noire86 commented 1 day ago

My bad, it's create:carriage_contraption

thexaero commented 1 day ago

Can you please tell me what mob you are using as the conductor?

Noire86 commented 1 day ago

I'm doing that obviously. Who are you yourself using specifically?

Personally, I've used parrot and steam n rails guy.

thexaero commented 1 day ago

Alright, thanks! Was it a tamed parrot?

Noire86 commented 1 day ago

P.S: We can talk about details in discord, if you would like

Noire86 commented 1 day ago

Alright, thanks! Was it a tamed parrot?

Not really, what I did was spawning a parrot from the egg and linking it with a leash. No taming whatsoever.

thexaero commented 1 day ago

I see. Can you please send me the main config file openpartiesandclaims-server.toml? I don't know about Discord. I'd prefer discussing it here in case I need to look up this issue in the future.

Noire86 commented 1 day ago

I see. Can you please send me the main config file openpartiesandclaims-server.toml? I don't know about Discord. I'd prefer discussing it here in case I need to look up this issue in the future.

No problem!

Speaking about config, here it is: openpartiesandclaims-server.toml.txt

thexaero commented 1 day ago

Thanks! Don't see any issues with the config. So strange how I was able to reproduce this on 1.18.2 because of a bug that shouldn't exist on 1.20.1. Pretty unexplainable at this point. What Forge version exactly are you using and what Create version exactly?

Noire86 commented 1 day ago

While I'm collecting the versions info, can you please clarify what's happened on your side?

You are not able to set or take off schedule from the conductor on a claimed chunk?

thexaero commented 1 day ago

On my side the protection works perfectly fine. I can only give or take the schedule when I have permission to do so in the claim. The only way to circumvent it for me is to drop the schedule on the station block.

Noire86 commented 1 day ago

Create: v0.5.1f Forge: 47.2.20

thexaero commented 1 day ago

Thanks, those are my versions too, so this is very strange. I'll have to take another look at this later. Have to go now.

Noire86 commented 1 day ago

On my side the protection works perfectly fine. I can only give or take the schedule when I have permission to do so in the claim. The only way to circumvent it for me is to drop the schedule on the station block.

Even if so, after allowing to interact with train contraption - there is still a possibility to take off the schedule from a conductor, or intercept train controls.

P.S Could it be the Arclight core issue? (Please don't hit me with sharp stones for that)

thexaero commented 1 day ago

P.S Could it be the Arclight core issue? (Please don't hit me with sharp stones for that)

Yes, I can now reproduce this when using Arclight. Going to investigate why that is.

thexaero commented 1 day ago

Alright, figured it out. They're overwriting a method completely, removing all of my injections. Looks like they're using a better approach in newer versions but I'm not entirely sure it works there either. Although I'm pretty sure I can now switch to using the Forge event instead of the injections, now that it has been fixed on Forge's end. Hopefully going to fix this issue too.

thexaero commented 1 day ago

Yep, seems to fix the issue.

Noire86 commented 22 hours ago

Really, really thank you! That's great news!