Cannons

Cannons

117k Downloads

Cannons Issue on Movecraft Translation and Rotation

MysteryTimeTrav opened this issue · 4 comments

commented

Hi, there seems to be an issue with Movecraft integration even with signs as a cannon will still appear to exist but won’t move with the ship despite the blocks that compromise the cannon moving with the ship. This essentially creates an invisible cannon at the original position the cannon was “registered” at when the ship moves. This is done with signs attached to the cannon as well and occurs on both translation and rotation in version 1.16.4.

Quote from developer of the Movecraft-Cannons integration add-on:
“ I'll have to look into what is happening here, it sounds like the cannons plugin is not properly dealing with async API calls, which may not be possible to fix.”

Pastebin of translation error

commented

Sadly, I stop active development of Cannons a while ago.

A few things you could try.:

  1. the main issue is that cannons will be creating a new cannon if there is no cannon at the current location and the criteria are fullfilled. In other words, if you move your craft asynchron the cannon will be at at different location in minecraft and database when you are moving. Can you try what happens if you load the cannon, move your craft, stop and than fire the cannon. In theory you will have the same amount of gunpowder loaded. If this works one could suppress the generation of new cannons on a ship while moving. However, finding the cannon while moving might be odd.
  2. Use cannon signs. Active "isSignRequired: True" in the cannon design and add a sign on the cannon. This should have a specific number 'Cannon2' once you create it and should move with your ship. This would make is possible to find the cannons with the sign first and than check the database. However, if Movecraft is moving blocks randomly you can get unexpected results during movement.

Most of if depends on how you want to use Cannons during movement.

commented

Sorry for the very late follow up, I was busy the past week.

I haven’t tested it extensively yet but from flying around and firing the guns for 10 minutes, it seems to work as long as you have the signs and stop the ship for at least 2 seconds before firing the guns. Firing right after stopping the ship causes problems sometimes. So giving the plugin some time to find the cannons works.

Triggering it while moving creates new cannons and causes the errors.

I’ll post a reply if I find any issues occurring from the stopping and waiting method, thank you.

commented
  1. I saw that you are already planing to use the CannonBeforeCreateEvent, I have to look into it how I could make it asynchron.
  2. Operating cannons on a moving craft is a little bit tricky since Cannons relays on clicks on a block. I am unsure how Movecraft handles the distance between real blocks and location of a craft.

Edit: can you forward me a link to the conversion with the Movecraft developer?

commented

The answer of the Movecraft developers was: "Eric is calling it asychn but the main branch calls it synchron".
I will close this ticket for now, let me know if you get further input.