Git Product home page Git Product logo

movecraft-repair's People

Contributors

eirikh1996 avatar goodroach avatar tylers1066 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

movecraft-repair's Issues

Repair Exception

Describe the bug
When a player attempts to repair a state which they have not saved, a FileNotFoundException is thrown.

Cooldown for saving ship states

Could we please get a cooldown so players cant spam create schematics of their ships.
Set in the config so we can set the time between how often they can be saving states of ships.

Typo in default configs

This is the error log.

[20:13:40 ERROR]: Error occurred while enabling Movecraft-Repair v1.0.0_beta-3 (Is it up to date?)
java.lang.IllegalArgumentException: Entry #stained_glass_pane is not a valid tag!
        at net.countercraft.movecraft.util.Tags.parseBlockRegistry(Tags.java:77) ~[Movecraft-CE-0.0.12A.jar:?]
        at net.countercraft.movecraft.repair.MovecraftRepair.loadConfig(MovecraftRepair.java:116) ~[Movecraft-Repair_1.0.0_beta-3.jar:?]
        at net.countercraft.movecraft.repair.MovecraftRepair.onEnable(MovecraftRepair.java:75) ~[Movecraft-Repair_1.0.0_beta-3.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:653) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:564) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:346) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1146) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2151]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

Basically on load the addon reads "#stained_glass_pane" in the configs and as it doesn't match up with the worldedit's block pattern it chokes and dies, the actual pattern is named "#stained_glass_panes" with an ending "s".

Rework the Repair Sign Mechanics

As today, the current way the Repair Sign allows players to both Save, Repair and Construct (with saved "files") any building or craft as long as ALL the materials are available in a chest inside the Shipyard. It's in my fairest belief that the player should be able to start the construction of ANY building or craft with the available material whether or not ALL that are needed are available. One but not only of the major pros of this idea is the fact that it can override some itens that were in the saved "file" but that the player does not have or cannot get anymore.

Disconnect from MapUpdateManager

Currently repairs are queued into the Movecraft MapUpdateManager per block. Ideally we would want a manager which can handle mass repairs and is disconnected from the main movecraft one, with a configurable task delay (allowing servers to reduce lag).

Empty Repair signs line 2 generates filename

Another QOL improvemnet to Repair: signs could be automatic filename generation, I suggest Username_date_time for a unique filename they cant overwrite. or Username_no an incremental number, or Username_movecraft_type.

Keep the filename option in line2, but if they leave it blank its auto generated for them and automatically put onto line 2 so they can see what was picked.

This is mostly a QOL for simplicity for them, so for learning how to make a repair sign all they need to know is Repair: or if #21 is implemented [repair].

Repair states overide issue

Is your feature request related to a problem?
When using repair states through a factory/shipyard to duplicate, or in my case, completely rebuild crafts lost in a battle... it can be very easy to left click a saved state sign, instead of right click, for activating the building phase which then (if in this scenario) you have no vehicle there present and therefore overriding you previous save. For what i'm working on this would be disaterous as players won't likely be duplicating smaller sized crafts on AP, as so there is no previous duplicate to revert the save state back to. With the ability of much larger vehicles upwards of 50k blocks, this makes the issue that much worse in terms of build loss.

Describe the solution you'd like
Some kind of fail safe. Maybe even just a ''Are you sure you want to override this saved state'', message requiring you to left click again to confirm. Or ideally (this would fix the issue) an option/change that doesn't allow you to override saves, instead requiring you to create a new repair state sign name. Perhaps adding an ability to delete them through a command incase they build up would be good alongside.

One thing i would add, which is something i mentioned in the discord, some kind of "/savedstates list" command. This would of course tie in great with the ability for players to delete their saved states too via command. Neither are crucial though.

A blacklist of blocks that could be replaced when repairing

Right now, you are able to break blocks like bedrock using the repair system by simply repairing over it. There should be a check done to see if there is any blacklisted blocks whenever a block is being placed using the repair system.

Suggestion: Command to save ship (with solution)

Ahoy!
I thought of a solution to requsting a command in #19

You mentioned that the sign needs to be the "anchor".

What if the command created the sign where you are standing when it makes the save of the ship.

Think of it as a player,

  1. Pilot a ship
  2. Run /saveship
    • Creates a sign where they are standing with Repair: first line, and second line is auto generated filename
    • Automatically registers the save event without the need of a tool!
    • Done!

Currently its:

  1. Teach the player how to make the sign
  2. They have to create a filename
  3. They have to know to use the correct tool to save a ship
  4. Then they have to know to double left click the repair sign!

So many things that can go wrong, ive always found simplicity is key.

They key here, is that you keep the current method, being able to manually create signs & create your own filenames, so then peolpe can have that option too!

My goal here is entirely to bypass the whole teaching/learning steps for players and make it as easy as possible.

Thank you!

Repair: QOL. Allow repair ship interaction in config / Feedback

Allow setting how you wish to interact with the repair sign in the config, if its right/left click, with or without an item, if its double click or not.

I like the idea of a repair item, but maybe allowing it to be single click would be easier for players.

There are quite a few steps (from what ive figured out) to get the repair sign to trigger, trying to think of ways to make it simplier for a first time user, being able to change the interaction to just a single left click of the rocket would be nice to test, I cant tell if it just takes a while or if it does require 2 clicks as theres no feedback instantly.

  1. Spectify in config the interaction with the sign hand/item, and rightclick/left click and if there is multiple clicks required this to be set to.
  2. Instant feedback when using the sign, if it does require multiple clicks
  3. When the sign is created for the first time Repair: could we get a configurable message sent to the user in chat for how to use the repair sign?
  4. Could we also have an option to change how the Reapir: sign is formatted in chat, most signs in servers use [repair] brackets and change the color of the text on the sign after its activated for feedback for the user.

Command to list a player's save states

Some of the more prolific shipbuilders on my server have amassed a large number of save states and have difficulty recalling them all. A command that lists a player's save states would be beneficial for such players.

Repair blocks

Config option to define certain blocks which would cover the repair cost for a defined list of blocks. Ideally if multiple ones could be setup. For example you might allow a oak log/plank to cover the cost of all oak plank related objects. Or a custom bought block repairs Xyz.

Would make it so decorating your craft isn't as punishing when it comes to repairing it. Players could of course fully customize what blocks repairs what, so balance wise its up to the admins.

I believe there is already a similar feature in which stone slabs can be used to repair other stone slabs? Not sure how extensive this system is or if it updates to 1.16.5 blocks. A wiki page on what blocks repair what would be neat whether the above is added or not.

Ability to cancel in-progress repairs

Is your feature request related to a problem? Please describe.
Players will sometimes start a repair mistakenly and have no way to cancel it.

Describe the solution you'd like
Some method (commands/signs/whatever) of cancelling a repair in progress.

Lectern Repair inventory issues

Currently, repairing a ship that has a lectern with a book in it will put the lectern into a glitchy state, requiring the player to break and replace the lectern. It would probably be better to instead special-case filled lecterns to also fill in the original book's contents (potentially costing another written book or book and quill)

Left click wont save a ship state, right click says no save state!

Ahoy!
First time using Repair as its own plugin with movecraft.
Using 8.0.0 Beta 1 Movecraft with the latest Movecraft-Repair 1.0.0 Beta 2 on PurPur 1.18.2.

For some reason after piloting a ship and left clicking the repair sign to create a ship state, nothing happens, nothign in chat, nothing in console. But right clicking tells me in big bold all caps that there is no save state.

If I look in the MoveCraft-Repair plugins folder its created a RepairStates folder and inside that another folder with my UUID, thats empty.

So its started the process to try and create a repair state, just not done it.

I am using the latest FAWE if that makes any differance?

Left clicking in creative should not break sign

Suggestion: If I was in creative mode and I try to left click the sign to repair a state, if the repair sign is not within the ship, the sign breaks. I would like it if the sign didn't break. This is a simple to fix issue, but not really that important.

Config to set schematics folder

Can we please get a config option to set the schematics folder, this allows us to use schematics cross server without using a symbolic link, but also, if we are able to set the folder to be inside the FAWE schematics folder, we can list schematics in-game, and also //paste them to quickly get a copy of a previously made ship.

Could not pass event PlayerInteractEvent to Movecraft-Repair

Ahoy! After ticket #19 I used the Firework to create a state for a ship, which created a schematic! Horray!
But then after trying every method I could think of to try and get it to restore, I checked the logs and saw that it was throwing an error when it was trying to fire the Restore function.

I would assume this is specific to FAWE or being 1.18.2?
There was no feedback in chat when interacting.

[09:45:30] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to Movecraft-Repair v1.0.0_beta-2
java.lang.NoSuchMethodError: 'void com.sk89q.worldedit.world.block.BlockType.<init>(java.lang.String)'
	at net.countercraft.movecraft.repair.util.WEUtils.getBlockContents(WEUtils.java:170) ~[Movecraft-Repair.jar:?]
	at net.countercraft.movecraft.repair.types.RepairState.execute(RepairState.java:144) ~[Movecraft-Repair.jar:?]
	at net.countercraft.movecraft.repair.RepairSign.createProtoRepair(RepairSign.java:157) ~[Movecraft-Repair.jar:?]
	at net.countercraft.movecraft.repair.RepairSign.onRightClick(RepairSign.java:98) ~[Movecraft-Repair.jar:?]
	at net.countercraft.movecraft.repair.RepairSign.onSignClick(RepairSign.java:82) ~[Movecraft-Repair.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor673.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:76) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:git-Purpur-1632]
	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:671) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_18_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:544) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:565) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1925) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:33) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1427) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1404) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1397) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1375) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1257) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:321) ~[purpur-1.18.2.jar:git-Purpur-1632]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

1.20.4 Errors

When a player tries to use a repair sign on the latest dev build, this error appears:

java.lang.NullPointerException: Cannot invoke "java.util.Map.containsKey(Object)" because "component" is null
at net.countercraft.movecraft.repair.util.WEUtils.getSignTextFromMap(WEUtils.java:242) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.util.WEUtils.getSignTextFromJSON(WEUtils.java:220) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.util.WEUtils.getBlockSignLines(WEUtils.java:207) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.types.RepairState.execute(RepairState.java:137) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.RepairSign.createProtoRepair(RepairSign.java:158) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.RepairSign.onRightClick(RepairSign.java:98) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at net.countercraft.movecraft.repair.RepairSign.onSignClick(RepairSign.java:83) ~[Movecraft-Repair_6db16c61234b620e5772692078365270691790c1.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor609.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:git-Paper-496]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.4.jar:git-Paper-496]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:594) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:536) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1935) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1465) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:123) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1442) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1365) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:133) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1343) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1232) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]```

De-module Movecraft-Repair

Currently Movecraft-Repair uses a multi-module system to support 1.10.2 to 1.16.5 using WorldEdit 6 and WorldEdit 7. Due to the decision to drop legacy support, we only need to support WorldEdit 7, and therefore can reverse a majority of #6.

repair states requiring unobtainable "water_cauldron" block

Describe the bug
When you run a repair state on a craft that has "water_cauldron" as part of the craft the repair state looks for said block rather then the "cauldron" block. You are unable to obtain a "water_cauldron" block thus making you unable to repair in the craft.

To Reproduce
Steps to reproduce the behavior:

  1. Save repair state of craft that has "water_cauldron" (Cauldron filled with any level or amount of water)
  2. Attempt to repair/factory said craft in
  3. List of items needed will appear one asking for "water_cauldron"
  4. Repairing in craft requires unobtainable block

Expected behavior
Simmilar to a craft not requiring "water" or "lava" as liquids, given they are unobtainable the same should apply for "water_cauldron" where the repair state looks for cauldron block rather then the water filled version but still repair in the water filled version.

Screenshots
repairpicture

Versions (please complete the following information):

  • Movecraft: 8.0.0_beta-2
  • Addons: Movecraft-Repair
  • Minecraft 1.20.1

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.