Ships
Ships
Source Code - Github |
JavaDocs |
Sponge version |
Discord channel |
Translate Core |
---|
Looking for Dev builds?
Dev builds give off new features and bug fixes before they are officially released, however these features and bug fixes may not have been tested as much as a release on here
Old page:
I am testing this new page out. I am aware of some parts that are missing such as ship types, but please say if there is anything that you wish to see. I plan on making a FAQ's that includes common questions such as how to change ship requirements.
If you want to see the old page, it is here
Video tutorial
Ships 6 changes
Ships has gone through many changes, Ships 6 is the latest rewrite of the plugin. The latest rewrite fixes multiple bugs found in the root of previous versions of Ships.
Features
Moving ships
As the name of the plugin suggests, you can create your own ship and move it with just a single click.
Works with all blocks
There is a fully-fledged list where you can configure every block to react differently for the ships, including being able to add a block type to interact with Ships, detect it as a collide, and even not react at all.
Teleport to ships
There have been many requests to be able to teleport to ships for not only this plugin but others like it. This feature has been added to Ships, however, if it is something you do not wish, then you can disable to command by not adding the command.
Falling Ships
Ships will fall/sink if requirements are not met, this could be done through your own interaction such as running out of fuel, or by something else such as a TNT explosion.
Ship types
Airship | Link |
Ship | Link |
Marsship | Link |
Submarine | Link |
Plane | Link |
Hybridship | Coming soon |
Move the ship:
In Ships, movement is done by signs. You can see all signs here
Collide types:
Name | ID | Description |
---|---|---|
Detect collide | DETECT_COLLIDE | If Ships detects this block in the way of a ship moving then the ship will not move with the error of this block being in the way |
Material | MATERIAL | Material means that you can build a ship out of this block and the Ships block detection system will detect it as part of your ship |
Ignore | IGNORE | If Ships detects this block in the way of a ship moving then the block will break and the ship will take its place |
Permissions
Permission node | Description |
---|---|
ships.cmd.info |
Allows the player to use the command '/ships info' |
ships.cmd.blockinfo |
Allows the player to use the command '/ships blockinfo' |
ships.cmd.shiptype.create |
Allows the player to use the command '/ships shiptype create' |
ships.cmd.config.set |
Allows the player to use the command '/ships config set' |
ships.cmd.config.view |
Allows the player to use the command '/ships config view' |
ships.cmd.blocklist.set |
Allows the player to use the command '/ships blocklist set' |
ships.cmd.blocklist.view |
Allows the player to use the command '/ships blocklist view' |
ships.cmd.ship.track |
Allows the player to use the command '/ships ship track' |
ships.cmd.ship.eot |
Allows the player to use the command '/ships ship eot' |
ships.cmd.ship.crew |
Allows the player to use the command '/ships ship crew' |
ships.move.own.ships.airship | Allows a player to move own airship |
ships.move.own.ships.watership | Allows a player to move own ship |
ships.move.own.ships.marsship | Allows a player to move own marsship |
ships.move.other.ships.airship | Allows a player to move anyones airship |
ships.make.ships.airship | Allows a player to make a airship |
ships.remove.other |
Allows a player to destroy anyones ships sign |
Developers:
Looking for a development wiki? maven/gradle dependencies? or something else relating to ships or translate core? Take a look at the getting started wiki
hi I have a few questions that need to be reported to you.
First, the submarine's [altitude] sign is clicked, and I found that the submarine will continue to fly into the air (in fact, the best stopping point is that the bottom material is in contact with water)
Clicking on the [Altitude] sign will almost leave air in the sea or deform the sea.
Perhaps the material contains half bricks, and I will continue to test to determine the cause.
In reply to kevinhsneh:
Thanks for the report. Ill be able to test it soon and see what I can do
In reply to kevinhsneh:
The submarine altitude issue is fixed in Alpha 2.2. It should also have fixed the deformation of the sea
I've been using this plugin, really love it, everyone really does enjoy it. I do wish there was more Cannons and ChairsReloaded Compatibility. (Perhaps making a newer version of the ShipsDamage plugin)
However , whenever a ship makes a movement, especially large ships, 4k blocks +, it takes a heavy toll on the TPS and it dips quite a lot, however bounces back soon after the movement is complete.
Is there anyway to help with this issue or any plans to work on it at all?
Edit: Whenever a Water Ship makes a movement* (Idk if its different for air ships since there's no blocks interacting with water.)
In reply to bradyykennyy:
As for more compatibility. As you may have seen im still working towards a stable build of Ships 6.0.0.0 however after that I plan to update all the first party addons to Ships with some exceptions (some of the plugins ships added onto didnt make the jump to 1.13+).
As for the tps drop, there is, as long as your using Ships 6. The short answer is to change the values in the config for Movement Algorithm and Block Detection from Ships 5 to Ships 6. You can do this using the /ships config command.
The long answer is, the tps is dropping due to the amount of steps required to be done in a single tick of the server. The ship needs to be detected, updated structure and then moved all in a single tick. Minecraft hates when you attempt to do what any other game does which is to use more Threads (a thread is a section of code that is ran, and depending on the processor your server is running on, can mean that multiple sections of code can be ran at once). The Ships 6 block detection and movement algorithm do all the same steps, however do it over multiple ticks, giving the server time to breathe. This does mean that the moving of the ship is slower but it reduces the lag so much that in my testing I didnt have any tps drop.
In reply to Mosemister:
Thank you for responding so quickly.
(have been using the latest version)
In game:
/ships config set config Advanced.Block.Finder ships:blockfinder_ships_six
When entered it didn't have a response but I assumed it still changed, is there somthing about the movement algorithm specifically in the config, or the Block Detection value in the config file that I have to change? Like from the Detection default value: 4000 (I think)
In reply to bradyykennyy:
The config command will change the config value without needing to go into the config itself. So it should be in effect, you can test using the /ships config view config command.
Based on what you have said so far. It seems you havent changed the movement algorithm (the movement algorithm makes the largest change to tps).
As for the tracking limit (default value being 4000) this is the limit that the block finder algorithm will give up trying to find more blocks. With Ships 5 block finder it can be used lower tps by lowering the value, with the ships 6 block finder it is used to speed up the movement of ships by lowering
In reply to Mosemister:
I don't know what to do anymore cause it seems I should be using Ships 6 since its the latest but I want to fix tps.
(like where is the movement algorithm)
In reply to bradyykennyy:
If you are able to change the block finder then you are able to change the movement algorithm, type the following command in exactly to change the movement algorithm.
ships config set config Advanced.Block.Movement ships:movement_ships_six
In reply to Mosemister:
I re downloaded the plugin, got some new configs, however its now killing my server.
Under mobspawn
Ships::Event: o.s.i.b.e.BukkitListener (EntitySpawnEvent)
In reply to bradyykennyy:
That looks like part of a error. Mind sending the whole crash so I can fix it?
Sorry your having all these issues.
In reply to bradyykennyy:
Hello, I want to help you, because you re-downloaded the plugin, but the new plugin does not match the ship's registration flag, so it crashes.
Please solve the problem according to the method I specified.
1. Remove the Ships plugin first (location: plugins)
2. Copy the folder backup and delete the folder (location: plugins\Ships)
3. Enter the minecraft game and manually remove the signs (any and all) of all hulls.
4. Download the latest version of Ships -b 6.0.0.0 R2 Alpha 2.1
5. Start the server (this time your server crash should be resolved)
6. Run the command as an administrator (/ships config set config Advanced.Block.Movement ships:movement_ships_six)
7. Build the hull and test if the minecraft TPS has improved
In reply to Mosemister:
If I get the errors again ill send them, because once the plugin started doing the purple boss bar at the top of the screen, every movement crashed the server and put out a lot of error lines. Appreciate the help.
In reply to kevinhsneh:
I will try that, thank you. I am however going to copy the blocklist over to the new config folder it creates since I had edited a lot in there.
In reply to bradyykennyy:
Im confused. Do you have errors/crash logs?
In reply to Mosemister:
Just got the error again after downloading the latest ships and switching to ships six movement. I made a 4000 block vessel and the TPS drops every time i right click the move sign and the server almost crashes when it moves.
It was not doing this before it had all the movement stuff in the config and bar visibility or what not.
Every time I make movement with any ships 6 config:
````````22.08 20:25:20 [Server] WARN Can't keep up! Is the server overloaded? Running 7114ms or 142 ticks behind
22.08 20:25:22 [Server] ERROR --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-163 (MC: 1.14.4) ---
22.08 20:25:22 [Server] ERROR The server has not responded for 10 seconds! Creating thread dump
22.08 20:25:22 [Server] ERROR ------------------------------
22.08 20:25:22 [Server] ERROR Server thread dump (Look for plugins here before reporting to Paper!):
22.08 20:25:22 [Server] ERROR ------------------------------
22.08 20:25:22 [Server] ERROR Current Thread: Server thread
22.08 20:25:22 [Server] ERROR PID: 34 | Suspended: false | Native: false | State: RUNNABLE
22.08 20:25:22 [Server] ERROR Stack:
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.IWorldReader.getChunkAt(IWorldReader.java:80)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:334)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.World.getType(World.java:726)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getNMS(CraftBlock.java:69)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlockState.<init>(CraftBlockState.java:34)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState0(CraftBlock.java:484)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState(CraftBlock.java:322)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState(CraftBlock.java:316)
22.08 20:25:22 [Server] ERROR org.ships.implementation.bukkit.world.position.BBlockPosition.getTileEntity(BBlockPosition.java:109)
22.08 20:25:22 [Server] ERROR org.ships.movement.MovingBlock.removeBeforePosition(MovingBlock.java:27)
22.08 20:25:22 [Server] ERROR org.ships.movement.MovingBlock.removeBeforePositionOverAir(MovingBlock.java:65)
22.08 20:25:22 [Server] ERROR org.ships.algorthum.movement.Ships6Movement$RemoveBlocks.run(Ships6Movement.java:55)
22.08 20:25:22 [Server] ERROR org.ships.implementation.bukkit.scheduler.BScheduler$RunAfterScheduler.run(BScheduler.java:16)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84)
22.08 20:25:22 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1147)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:417)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1074)
22.08 20:25:22 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:918)
22.08 20:25:22 [Server] ERROR java.lang.Thread.run(Thread.java:748)
22.08 20:25:22 [Server] ERROR ------------------------------
22.08 20:25:22 [Server] ERROR --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
22.08 20:25:22 [Server] ERROR ------------------------------
22.08 20:25:27 [Server] INFO UUID of player Uz_i is 2a9e04a3-42c3-485e-a01a-a40cc7484ead
22.08 20:25:27 [Server] ERROR --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-163 (MC: 1.14.4) ---
22.08 20:25:27 [Server] ERROR The server has not responded for 15 seconds! Creating thread dump
22.08 20:25:27 [Server] ERROR ------------------------------
22.08 20:25:27 [Server] ERROR Server thread dump (Look for plugins here before reporting to Paper!):
22.08 20:25:27 [Server] ERROR ------------------------------
22.08 20:25:27 [Server] ERROR Current Thread: Server thread
22.08 20:25:27 [Server] ERROR PID: 34 | Suspended: false | Native: false | State: RUNNABLE
22.08 20:25:27 [Server] ERROR Stack:
22.08 20:25:27 [Server] ERROR sun.misc.Unsafe.getObjectVolatile(Native Method)
22.08 20:25:27 [Server] ERROR java.util.concurrent.atomic.AtomicReferenceArray.getRaw(AtomicReferenceArray.java:130)
22.08 20:25:27 [Server] ERROR java.util.concurrent.atomic.AtomicReferenceArray.get(AtomicReferenceArray.java:125)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.PlayerChunk.a(PlayerChunk.java:258)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkFutureMainThread(ChunkProviderServer.java:247)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:150)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:373)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.IWorldReader.getChunkAt(IWorldReader.java:80)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.World.getChunkAt(World.java:334)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.World.getType(World.java:726)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getType(CraftBlock.java:211)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState0(CraftBlock.java:329)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState(CraftBlock.java:322)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.block.CraftBlock.getState(CraftBlock.java:316)
22.08 20:25:27 [Server] ERROR org.ships.implementation.bukkit.world.position.BBlockPosition.getTileEntity(BBlockPosition.java:109)
22.08 20:25:27 [Server] ERROR org.ships.movement.MovingBlock.removeBeforePosition(MovingBlock.java:27)
22.08 20:25:27 [Server] ERROR org.ships.movement.MovingBlock.removeBeforePositionOverAir(MovingBlock.java:65)
22.08 20:25:27 [Server] ERROR org.ships.algorthum.movement.Ships6Movement$RemoveBlocks.run(Ships6Movement.java:55)
22.08 20:25:27 [Server] ERROR org.ships.implementation.bukkit.scheduler.BScheduler$RunAfterScheduler.run(BScheduler.java:16)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84)
22.08 20:25:27 [Server] ERROR org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1147)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:417)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1074)
22.08 20:25:27 [Server] ERROR net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:918)
22.08 20:25:27 [Server] ERROR java.lang.Thread.run(Thread.java:748)
22.08 20:25:27 [Server] ERROR ------------------------------
22.08 20:25:27 [Server] ERROR --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
22.08 20:25:27 [Server] ERROR ------------------------------
From stress testing with some players and what not it seems that any config set to ships six kills the server and tps. However when its all ships five, tps only dips during a movement, (then quickly corrects itself) instead of slowing and crashing the whole server, so it's essentially still playable with ships 5 configs.
In reply to bradyykennyy:
Thats interesting. So the ships 6 movement is in effect, but the issue in effect is that its attempting to do too much.
Ill release another update tomorrow, that will give you more fine control over the ships 6 block tracking and movement algorithm. Including how many blocks it will attempt to move at once and the delay between every attempt of movement. Ill also set the default values to something more reasonable then what ships 6 currently has. (Currently moves 100 blocks every millasecond)
In reply to Mosemister:
Well I hope it helps not crash and fix Major TPS loss.
Also the boss bar visibility config only turns off movement when its right clicking a sign not left clicking, left clicking still shows the boss bar processing the movement. (I think its only with the EOT sign)
All with Ship5 Find and Movement:
Adjusting ship engine signs causes lots of lag. Like adjusting speed.
Also the some of the ships are having some issues keeping the player on the ship, like teleporting them back onto it when moving like above 5 block speed. Possibly because standing on slabs or stairs?
Also does having high EOT speed cause more lag?
EOT movement causes the most tps loss because of the constant movement. (duh)
https://gyazo.com/a6e8014461883ce9116422f5bdc2d1a5
https://gyazo.com/da83ce823a32f7ae8cb69baf3fa26c21
*dies*
In reply to bradyykennyy:
Hi, So ive been working on Ships for a while today. I found one of the issues. The Ships 6 block finder has something called a memory leak in the code. This is what is causing the server to crash. I am attempting to fix the issue now.
As for the EOT progress bar, you are correct, this has been fixed on my internal copy of Ships so it will be fixed in the next update.
The changing of engine speed will cause a lot of lag, this is due to the fact that it needs to get the max and min values it can be from the ship itself, for it to grab the ship it is connected to, it need to do the block find for the licence sign, so it uses the block finder.
Changing the speed of any ship should not effect anything, as the only difference between having a low speed compared to a high speed is the checking for detection between the two points, the process used to detect the two points is a very simple form of ray tracing, it is so simple that all it does is adds 1 to the XYZ and then checks the block at that position, if its a collide block then it will fail, if not then it carries on.
As for keeping the player on the ship, this has been reported before, but I can not pinpoint the reason of the fault. Standing on stairs and slabs should not effect the outcome. You can find out if the ship detects the player by simply right clicking the licence sign (showing total entities). Changing the speed of the vessel, as mentioned before, should not effect the outcome so I am stumped on that case.
In reply to Mosemister:
Alright, cool cool.
Is there anything can be done to reduce lag from changing the value on the engine side? Or is it basically fixed with Ships 6?
Iv'e noticed no specific TPS loss when the ship is moving at fast speeds with EOT, when know ones on it. Its just the teleporting the entity to the block they were last standing on that I believe causes the most TPS loss. That's probably obvious. I'll do whatever to not have to uninstall it due to popular demand.
Me having this plugin installed pisses everyone on the server off cause when I'm just enjoying sailing around, everyone else on the server isn't able to build etc. I just love the plugin though and I want to help make it smooth and lag free so everyone else can see why I enjoy it so much.
I really appreciate all the responses you've been giving.
In reply to bradyykennyy:
Hi, I am uploading the next update as you sent that message that fixes a lot of the issue you have addressed (not the entities teleporting to their previous position ... still stumped on that one). I have been testing it all day to see how the tps is though many tests. I hope this new update works for your server and stops your players being pissed off.
Once again the less tps option is to enable ships 6 for both movement and block tracking, don't worry the memory leak has been fixed as well as a bug with the ships 6 movement that I found when testing it with ships around the size of 3,6000 blocks.
The update is awaiting approval