Git Product home page Git Product logo

movecraft-cannons's Introduction

Movecraft-Cannons Integration

Cannons Codebeat

Home of the code for the following features:

  • Cannons plugin integration
  • Optional Movecraft-Combat integration (requires v1.2+ and Cannons v2.4.6+)

Version support

The legacy branch is coded for 1.10.2 to 1.16.5 and Movecraft 7.x.

The main branch is coded for 1.14.4 to 1.20.1 and Movecraft 8.x.

Download

Devevlopment builds can be found on the GitHub Actions tab of this repository.

Stable builds can be found on our SpigotMC page.

Building

This plugin requires that the user setup and build their Movecraft-Combat development environment, and then clone this into the same folder as your Movecraft-Combat development environment such that Movecraft-Cannons and Movecraft-Combat are contained in the same folder.

Then, run the following to build Movecraft-Cannons through maven.

mvn clean install

Jars are located in /target.

Support

Github Issues

Discord

The plugin is released here under the GNU General Public License V3.

movecraft-cannons's People

Contributors

goodroach avatar tylers1066 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

movecraft-cannons's Issues

Download?

I'm not sure how to download this. The artifact from the latest dev build has expired. Is there a .jar to download, or the src so I can compile it? I don't know how to compile it but by god I will learn.

Fire cannons on left/right click

Would be really cool to have the ability to fire specific cannons when using left/right click and looking where you'd like to aim. Could be done using signs overtop of regular cannon signs or anything else.

A fork for the Cannons plugin for 1.20.4 can be found here:
https://github.com/Intybyte/Cannons

Disabling cannons if not on a piloted craft

Hey Tyler! Thanks for the plugin first.

I was wondering if you could add an option which would disable the cannons from working/firing unless they are piloted on movecraft vehicles.

One main issue with cannons is one could very easily place them on the ground in mass amounts and simply shoot down opposing crafts while posing no risk to losing a ship. For sky ships this isn't as much of an issue but for land vehicles it is.

It also would function as a means of stopping people from releasing and firing (i know movecraft-combat does that but its a nice addition).

Cannon rotation reports

For paper 1.14.4 and with or without the protection addons, cannons reset on rotation for me.

Cannons being unregistered on craft movement

In the latest fork by eirikh the movecraft cannons plugin does not work, cannons get unregistered and need to be remade after any ship movement, tested on paper 1.16.5 778 with movecraft, and movecraft cannons

Director aiming

Hi Tyler,
I was wondering if you could add a Director for cannon projectiles. I spoke to the Cannons owner about this but hes not active on the project anymore. Also i think it would involve a lot more changes to pull off.

Cannons allows one to auto reload and using redstone fire off a selection of them in one go. If one could direct the aiming this could allow for a wider variety of user with cannons and movecraft! I mean you could have ships with 3 large cannons that could aim similar to tnt turrets.

[Feature Request] Per-craft cannon limits

Firstly, thank you for creating this addon! I wasn't even sure it was possible to make. I will be testing it on my 1.16.4 server which is currently in development.

There has, however, been a small loss of functionality. Eirikh's fork has a feature which allows users to limit the numbers of a specified cannons that can be present on a craft. One use case for this is to help separate cannons between 'ground' and 'naval' classes, or to restrict heavier cannon designs to larger ship types (rather than, say, skiffs). It would be great to see this added if possible.

This could be an addendum to the configuration file - for example, one of my craft files on eirikh's fork has the following section:

maxCannons:
   "Mortar": N2
   "Cannon": N0
   "LargeCannon": N0
   "57mmArtilleryS": N0
   "57mmArtilleryL": N30 
   "240mmHowitzerS": N0 
   "240mmHowitzerL": N8

cannons reset when craft is repiloted

Describe the bug
When you release/repilot/pilot a craft it resets cannons (but it doesn't if you move! i have movecraft-cannons)

To Reproduce
Steps to reproduce the behavior:

  1. setup the cannon
  2. pilot the craft
  3. try and use the cannon
  4. and the cannons reset

Expected behavior
you need to repay for a cannon and redo everything (not good when your in combat and like going on your wing for shooting people and you accidently release your craft and stuff)

Screenshots

Versions (please complete the following information):

  • Movecraft: Alpha 4
  • Java 16
  • Minecraft paper 1.16.5

Additional context
i have towny, movecraft-cannons, movecraft-combat, and cannons
those should be the important plugins you need to know about

See APDevTeam/Movecraft#443

Aiming mode cannons bug

Movecraft: 8.0.0-a.4
Java: 16
paper 1.17.1-136
Movecraft-cannons: 1.a.3

I've noticed when activating the aiming mode (default: clock) in the most recent github version of cannons, that upon cruising forward leaving mode gets disabled. It seems movecraft doesn't keep up with cannons' aiming mode. This did NOT occur when manually flying, the aiming mode did not disable. Got this error in my console which might be a result of it. I can produce a video if need be.
image

Cannons not functioning properly in subcrafts

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?

StackOverflowError - Could not pass event EntityDamageByEntityEvent to Cannons

So we had a user spam killed in our chat, which we have never seen before in 9 years! Always great to see something new!
https://i.imgur.com/0OMAwXT.png

Which turned up a Cannons/Movecraft-Cannons error in the log, the reason we know it was Movecraft-Cannons is the way he described what happened:
https://i.imgur.com/UUquqmn.png

When you fire a cannon forwards while moving

https://gist.github.com/TomLewis/db7037e6f3df915f8da3608b5248de75

Turns out this players put /cruise on a hotkey and spammed it like 1000 times while firing a ship!?

Cannons being unbought when a craft moves in any way

I have been seeing my players keep annoying me about the cannons being unbought everytime their craft moves, so i have looked into it.

I saw in the Logs that Movecraft-Cannons loaded fine but saw an error after which is this

[02:24:20] [Server thread/ERROR]: Could not pass event CraftTranslateEvent to Movecraft-Cannons v1.0.0-a.7
net.countercraft.movecraft.exception.EmptyHitBoxException: null
	at net.countercraft.movecraft.util.hitboxes.HitBox.getMidPoint(HitBox.java:54) ~[Movecraft_dea553609fc0f5bb3a2f2abd01d8286290ff32ca.jar:?]
	at net.tylers1066.movecraftcannons.listener.TranslationListener.delta(TranslationListener.java:42) ~[Movecraft-Cannons.jar:?]
	at net.tylers1066.movecraftcannons.listener.TranslationListener.translateListener(TranslationListener.java:33) ~[Movecraft-Cannons.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor441.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:git-Purpur-1598]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:631) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at net.countercraft.movecraft.async.translation.TranslationTask.execute(TranslationTask.java:309) ~[Movecraft_dea553609fc0f5bb3a2f2abd01d8286290ff32ca.jar:?]
	at net.countercraft.movecraft.async.AsyncTask.run(AsyncTask.java:47) ~[Movecraft_dea553609fc0f5bb3a2f2abd01d8286290ff32ca.jar:?]
	at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1558) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1482) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1598]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

idrk what to do but if you can help it would be a great thanks

Cannons and Server software incompatibilities?

Describe the bug
The Cannons bug which involves them being re-created each time a movecraft vehicles moves and the player right clicks the corresponding Cannon design, seems to occur on paperspigot server versions #470+ #778 (latest) and the following plugins:

Movecraft 8.0.0-a.3
Movecraft Cannons 1.a.0
Movecraft Combat 2.a.0
Movecraft Worldguard 1.a.0
1.16.5 version WG/WE/Protocol.
Cannons v2.5.10 (latest)
The following above plugin options alongside a 1.16.5 PURPUR server jar seem to work fine with cannons. Although a world i created and --forceUpgraded via a 1.16.5 paperspgiot server, copied onto my PURPUR test server recreates the same bug.

To Reproduce
Create a server with the above listed plugins and try piloting a craft with a cannon on it, claim the cannon, move the craft, then right click the cannon again.

Expected behavior
The bug should occur.

Screenshots
https://imgur.com/a/1Wafc5J

short gif displaying the bug
Versions (please complete the following information):

Mostly listed above
Java 16
Minecraft 1.16.5

Cannon translation reports

Describe the bug
Been having a bug where cannons get reset on the move and rotation. it happens on Tank craft(custom ground craft ) and submarine.

To Reproduce
Steps to reproduce the behavior:
No visible errors

Expected behavior
I wanted the cannon to not get reset and work properly.

Screenshots
None.

Versions (please complete the following information):

Movecraf: 8 java CI Repair - signs #189
Java JDK 16.0.0
Minecraft paper-1.16.5
Additional context
none

Error on ship movement

The following error is thrown upon each CraftPreTranslateEvent using the Movecraft-Cannons (v0.1.0) and Movecraft-Eirik jars bundled in the latest release with Cannons v2.5.8 on 1.16.4, preventing cannons data from being translated with the craft:

[23:44:11 ERROR]: Could not pass event CraftPreTranslateEvent to Movecraft-Cannons v0.1.0
java.lang.IllegalStateException: CannonBeforeCreateEvent may only be triggered synchronously.
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:595) ~[patched_1.16.4.jar:git-Purpur-949]
        at at.pavlov.cannons.cannon.CannonManager.getCannon(CannonManager.java:555) ~[?:?]
        at at.pavlov.cannons.cannon.CannonManager.getCannons(CannonManager.java:434) ~[?:?]
        at at.pavlov.cannons.API.CannonsAPI.getCannons(CannonsAPI.java:103) ~[?:?]
        at net.tylers1066.movecraftcannons.MovecraftCannons.getCannons(MovecraftCannons.java:91) ~[?:?]
        at net.tylers1066.movecraftcannons.listener.TranslationListener.translateListener(TranslationListener.java:18) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1103.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Purpur-949]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.16.4.jar:git-Purpur-949]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Purpur-949]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Purpur-949]
        at net.countercraft.movecraft.async.translation.TranslationTask.execute(TranslationTask.java:162) ~[?:?]
        at net.countercraft.movecraft.async.AsyncTask.run(AsyncTask.java:45) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.4.jar:git-Purpur-949]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:58) ~[patched_1.16.4.jar:git-Purpur-949]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.4.jar:git-Purpur-949]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

CannonBeforeCreateEvent can be fired from the CannonManager#getCannon method, which is used by MovecraftCannons#getCannons, which is called asynchronously from the CraftPreTranslate listener. According to the first reply to this thread from the Spigot forums, sync events must be called from the main thread in 1.14+.

Working cannon reports

I'm opening this issue so people can report fully working Movecraft-Cannons installs. This will allow us to compare these reports to #9 and #10 to find the differences and track down these annoying bugs,

Not functioning

Hey, this plugin no longer seems to work. Every time a ship moves, the cannons must be re-bought, stocked, and loaded. I am using eirikh's Movecraft fork (most recent version) and the normal cannons plugin, both work separately on my paper 1.18.2 server, but cannons are not being integrated to the crafts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.