APDevTeam / Movecraft-Cannons

Movecraft & Cannons Integration
GNU General Public License v3.0
6 stars 9 forks source link

Cannons not functioning properly in subcrafts #17

Closed DaarkKarma closed 1 year ago

DaarkKarma commented 2 years ago

If a cannon is part of a subcraft, it no longer works in the way the addon intends. When the turret is first made, the cannons work fine and as expected, but the moment the turret turns, the cannons break, they aren't treated like the same cannons, prompting you to recreate it and the aiming is all off. The end result is two cannons occupying a space when in reality there is only one cannon. (this is also seen on the cannon signs as their name changes when the subcraft is turned)

So as it stands, the addon allows for cannons to be carried on ships but they cannot be used in turrets without breaking.

I discussed this in the cannons community and it is believed that the Movecraft-Cannons Addon doesn't include subcrafts. It works on normal crafts but subcrafts are ignored.

on the RotationListener it does not include import net.countercraft.movecraft.craft.SubCraft; and import net.countercraft.movecraft.craft.SubcraftRotateCraft; in the import list, so perhaps this is the reason?

TylerS1066 commented 2 years ago

I discussed this in the cannons community and it is believed that the Movecraft-Cannons Addon doesn't include subcrafts. It works on normal crafts but subcrafts are ignored.

That shouldn't be the case, since Movecraft-Cannons should work on all crafts, but I didn't ever test it against subcrafts.

on the RotationListener it does not include import net.countercraft.movecraft.craft.SubCraft; and import net.countercraft.movecraft.craft.SubcraftRotateCraft; in the import list, so perhaps this is the reason?

This would not be the issue, the various *Craft classes all implement Craft, and as such there shouldn't need to be any special handling internally for a subcraft rotating vs a full craft rotating.

Can you include what Minecraft (e.g. paper-1.18.2-370), Movecraft, Movecraft-Cannons, and Cannons versions you are running?

Can you also elaborate on what you mean by this?

this is also seen on the cannon signs as their name changes when the subcraft is turned

I'm not aware of how to have cannon signs with names on them, but I also don't use the Cannons plugin often.

DaarkKarma commented 2 years ago

I'm on spigot-1.18.2 using Movecraft 8.0.0-a.7, Movecraft-Cannons 1.0.0-a.8 and Cannons 2.5.12

In regards to the cannon sign, When you put a sign on a cannon so it can work on ships it provides info on that sign. It's always been recommended to put a sign physically onto a cannon in order to function on moving ships such as movecraft.. The first line is the name of the cannon (as cannons are created automatically it'll have a name like "classic 2" for example) under that is the owners name (or the one who made it) and then 3rd and 4th lines are some random info that I'm not too sure of.

When you turn the ship normally the sign stays the same. "Classic 2" is still "Classic 2" But if you turn the subcraft then look at the sign you'll notice the cannon name is changed. it'll be like "Classic 3" or something. Although the sign makes it obvious that the system consideres it a new cannon, it's made more obvious by the fact that right clicking the cannon flat out tells you that you made a cannon.

I have also tried the cannons without the sign incase it was two systems conflicting but the problem is the same regardless.

TylerS1066 commented 2 years ago

In regards to the cannon sign, When you put a sign on a cannon so it can work on ships it provides info on that sign. It's always been recommended to put a sign physically onto a cannon in order to function on moving ships such as movecraft..

I was not aware of this, nor have I been using signs in my testing of cannons, I just used the default cannons from the tutorial video on some airships that I flew around.

DaarkKarma commented 2 years ago

The sign feature was introduced before movecraft cannons. It was primarily used as a means of allowing cannons to maintain it's data while being moved either through movecraft or isails. Upon recent tests I can confirm that with movecraft cannons the cannon sign is no longer needed on ships. However the problem I have seems unique to subcrafts.

Here is a vid documenting the issue.

In the vid the subcraft is on it's own however the bug is present on subcrafts that are built on ships in the way you'd expect them to (such as a turret) This is using the default turret craft file

TylerS1066 commented 1 year ago

Fixed as of #20 and https://github.com/APDevTeam/Movecraft-Cannons/commit/c2893e9bcc46786c1397a24316fc3de4106cb401