From 80247ab566aa8dd37445b7b18918d879ab863dac Mon Sep 17 00:00:00 2001 From: Pulverizer <9803259+Pulverizer@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:59:21 +0100 Subject: [PATCH] nearly complete port to Sponge API 8 --- .gitignore | 3 + .idea/codeStyles/codeStyleConfig.xml | 1 + .idea/compiler.xml | 3 +- .idea/gradle.xml | 3 +- .idea/workspace.xml | 181 +++++++++++++-- build.gradle.kts | 55 ++++- ...lverizer.movecraft.common_build.gradle.kts | 50 +---- {gradle/forge => forge}/build.gradle.kts | 0 {gradle/forge => forge}/gradle.properties | 0 settings.gradle | 4 +- .../pulverizer/movecraft/Movecraft.java | 52 +++-- .../config/craft/BlockMapCraftSetting.java | 10 +- .../api/config/craft/BooleanCraftSetting.java | 4 +- .../api/config/craft/CraftSetting.java | 14 +- .../api/config/craft/DoubleCraftSetting.java | 4 +- .../api/config/craft/FloatCraftSetting.java | 4 +- .../api/config/craft/IntegerCraftSetting.java | 4 +- .../api/config/craft/LongCraftSetting.java | 4 +- .../api/config/craft/StringCraftSetting.java | 4 +- .../api/event/CraftCollisionEvent.java | 9 +- .../movecraft/api/event/CraftDetectEvent.java | 20 +- .../movecraft/api/event/CraftPilotEvent.java | 9 +- .../api/event/CraftReleaseEvent.java | 9 +- .../movecraft/api/event/CraftRotateEvent.java | 9 +- .../movecraft/api/event/CraftSinkEvent.java | 9 +- .../api/event/CraftTranslateEvent.java | 7 +- .../api/event/RegisterFeaturesEvent.java | 6 +- .../api/event/SignTranslateEvent.java | 30 +-- .../movecraft/async/AsyncManager.java | 74 +++--- .../pulverizer/movecraft/async/AsyncTask.java | 17 +- .../movecraft/async/DetectionTask.java | 115 +++++----- .../movecraft/async/RotationTask.java | 85 +++---- .../movecraft/async/TranslationTask.java | 209 +++++++++-------- .../movecraft/commands/ContactsCommand.java | 44 ++-- .../commands/CraftReportCommand.java | 44 ++-- .../movecraft/commands/CraftTypesCommand.java | 96 ++++---- .../movecraft/commands/CrewCommand.java | 94 ++++---- .../movecraft/commands/DockCommand.java | 48 ++-- .../movecraft/config/ConfigManager.java | 27 ++- .../pulverizer/movecraft/config/Settings.java | 71 +++--- .../movecraft/config/craft/CraftSettings.java | 60 ++--- .../movecraft/config/craft/CraftType.java | 11 +- .../pulverizer/movecraft/craft/Craft.java | 211 +++++++++--------- .../movecraft/craft/CraftManager.java | 140 +++++++----- .../movecraft/craft/crew/CrewInvite.java | 26 +-- .../movecraft/craft/crew/CrewManager.java | 164 +++++++------- .../movecraft/listener/BlockListener.java | 149 +++++++------ .../movecraft/listener/InteractListener.java | 75 ++++--- .../movecraft/listener/PlayerListener.java | 81 ++++--- .../movecraft/listener/SignListener.java | 37 ++- .../map_updater/MapUpdateManager.java | 4 +- .../update/BlockCreateCommand.java | 18 +- .../update/CraftRotateCommand.java | 44 ++-- .../update/CraftTranslateCommand.java | 44 ++-- .../update/EntityUpdateCommand.java | 7 +- .../update/ExplosionUpdateCommand.java | 21 +- .../update/ItemDropUpdateCommand.java | 40 ++-- .../update/ParticleUpdateCommand.java | 23 +- .../pulverizer/movecraft/sign/AscendSign.java | 63 +++--- .../movecraft/sign/CommanderSign.java | 57 ++--- .../movecraft/sign/ContactsSign.java | 46 ++-- .../pulverizer/movecraft/sign/CraftSign.java | 31 ++- .../pulverizer/movecraft/sign/CrewSign.java | 137 ++++++------ .../pulverizer/movecraft/sign/CruiseSign.java | 74 +++--- .../movecraft/sign/DescendSign.java | 61 ++--- .../pulverizer/movecraft/sign/HelmSign.java | 48 ++-- .../pulverizer/movecraft/sign/PilotSign.java | 11 +- .../movecraft/sign/RelativeMoveSign.java | 36 +-- .../movecraft/sign/ReleaseSign.java | 18 +- .../pulverizer/movecraft/sign/RemoteSign.java | 87 ++++---- .../pulverizer/movecraft/sign/SpeedSign.java | 46 ++-- .../movecraft/sign/StaticMoveSign.java | 28 +-- .../pulverizer/movecraft/sign/StatusSign.java | 96 ++++---- .../movecraft/sign/SubcraftRotateSign.java | 96 ++++---- .../movecraft/sign/TeleportSign.java | 36 +-- .../utils/BlockSnapshotSignDataUtil.java | 10 +- .../movecraft/utils/BoundingBoxUtils.java | 26 +-- .../pulverizer/movecraft/utils/ChatUtils.java | 91 +++----- .../movecraft/utils/CollectionUtils.java | 2 +- .../movecraft/utils/HashHitBox.java | 102 ++++----- .../pulverizer/movecraft/utils/HitBox.java | 4 +- .../pulverizer/movecraft/utils/MathUtils.java | 35 ++- .../movecraft/utils/MutableHitBox.java | 3 +- .../movecraft/utils/SolidHitBox.java | 44 ++-- .../movecraft/utils/WorldUtils.java | 17 +- .../movecraft/world/ChunkDataManager.java | 159 ++++++------- .../movecraft/world/NextTickProvider.java | 59 ++--- .../movecraft/world/TileHolder.java | 31 +-- src/main/resources/movecraft.accesswidener | 6 + {gradle/vanilla => vanilla}/build.gradle.kts | 14 +- 90 files changed, 2169 insertions(+), 1992 deletions(-) rename {gradle/forge => forge}/build.gradle.kts (100%) rename {gradle/forge => forge}/gradle.properties (100%) rename {gradle/vanilla => vanilla}/build.gradle.kts (92%) diff --git a/.gitignore b/.gitignore index ad0ef9dca..4f0feb2c2 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,6 @@ nb-configuration.xml /gradle/forge/.gradle/ /gradle/forge/build/ /gradle/vanilla/build/ +/forge/.gradle/ +/forge/build/ +/vanilla/build/ diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index a55e7a179..6e6eec114 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,6 @@ + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 3ff3e3228..29d15d7d2 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -31,13 +31,12 @@ - + - diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 4f2a7b340..20d878e75 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -12,8 +12,7 @@ diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9ae50fcc9..580c5dc56 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -14,13 +14,100 @@