From 995fb20f6a4868f80f62bad41c190cbc09f3cfdb Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sun, 3 Dec 2023 21:16:28 +0100 Subject: [PATCH] Code formatting --- docs/DEVELOPER_API.md | 2 ++ .../de/florianmichael/viafabricplus/event/LoadCallback.java | 1 + .../viafabricplus/event/LoadSaveFilesCallback.java | 1 + .../viafabricplus/event/RegisterSettingsCallback.java | 1 + .../viafabricplus/fixes/classic/CPEAdditions.java | 2 ++ .../viafabricplus/fixes/classic/GridItemSelectionScreen.java | 2 ++ .../viafabricplus/fixes/classic/WorldHeightSupport.java | 1 + .../fixes/classic/command/ListExtensionsCommand.java | 2 ++ .../viafabricplus/fixes/classic/command/SetTimeCommand.java | 2 ++ .../florianmichael/viafabricplus/fixes/entity/BoatModel1_8.java | 2 ++ .../viafabricplus/fixes/entity/BoatRenderer1_8.java | 2 ++ .../viafabricplus/fixes/tracker/JoinGameTracker.java | 1 + .../viafabricplus/fixes/tracker/TeleportTracker.java | 1 + .../viafabricplus/injection/ViaFabricPlusMixinPlugin.java | 2 ++ .../injection/mixin/base/integration/MixinDebugHud.java | 1 + .../injection/mixin/base/perserverversion/MixinServerInfo.java | 1 + .../compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java | 1 + .../injection/mixin/compat/jsonwebtoken/MixinClasses.java | 1 + .../mixin/compat/jsonwebtoken/MixinDefaultJwtParserBuilder.java | 1 + .../injection/mixin/fixes/minecraft/MixinCamera.java | 1 + .../mixin/fixes/minecraft/block/MixinEndPortalBlock.java | 1 + .../mixin/fixes/minecraft/block/MixinFarmlandBlock.java | 1 + .../mixin/fixes/minecraft/block/MixinSoulSandBlock.java | 1 + .../injection/mixin/viabedrock/MixinBlobCache.java | 1 + .../viafabricplus/protocolhack/command/VFPViaSubCommand.java | 1 + .../protocolhack/command/ViaFabricPlusVLCommandHandler.java | 1 + .../protocolhack/command/ViaFabricPlusViaCommandSender.java | 2 ++ .../protocolhack/impl/ViaFabricPlusVLInjector.java | 1 + .../impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java | 1 + .../protocolhack/netty/ViaFabricPlusViaDecoder.java | 1 + .../vialegacy/ViaFabricPlusClassicWorldHeightProvider.java | 1 + .../provider/vialegacy/ViaFabricPlusEncryptionProvider.java | 1 + .../provider/vialegacy/ViaFabricPlusGameProfileFetcher.java | 2 ++ .../provider/vialegacy/ViaFabricPlusOldAuthProvider.java | 1 + .../viaversion/ViaFabricPlusCommandArgumentsProvider.java | 1 + .../viaversion/ViaFabricPlusPlayerAbilitiesProvider.java | 1 + .../viaversion/ViaFabricPlusPlayerLookTargetProvider.java | 1 + .../java/de/florianmichael/viafabricplus/save/AbstractSave.java | 2 ++ .../java/de/florianmichael/viafabricplus/save/SaveManager.java | 2 ++ .../de/florianmichael/viafabricplus/save/impl/AccountsSave.java | 1 + .../de/florianmichael/viafabricplus/save/impl/SettingsSave.java | 2 ++ .../de/florianmichael/viafabricplus/screen/VFPListEntry.java | 2 ++ .../java/de/florianmichael/viafabricplus/screen/VFPScreen.java | 1 + .../viafabricplus/screen/base/PerServerVersionScreen.java | 2 ++ .../viafabricplus/screen/base/ProtocolSelectionScreen.java | 2 ++ .../viafabricplus/screen/settings/SettingsScreen.java | 2 ++ 46 files changed, 63 insertions(+) diff --git a/docs/DEVELOPER_API.md b/docs/DEVELOPER_API.md index 2520ce50..33ecf621 100644 --- a/docs/DEVELOPER_API.md +++ b/docs/DEVELOPER_API.md @@ -64,6 +64,7 @@ if (ItemRegistryDiff.contains(Items.STONE, VersionRange.andOlder(VersionEnum.r1_ ### Creating own settings for the settings screen ```java public class ExampleSettingGroup extends SettingGroup { + private static final ExampleSettingGroup instance = new ExampleSettingGroup(); public final BooleanSetting test = new BooleanSetting(this, Text.of("Test"), false); @@ -75,6 +76,7 @@ public class ExampleSettingGroup extends SettingGroup { public static ExampleSettingGroup global() { return instance; } + } ``` diff --git a/src/main/java/de/florianmichael/viafabricplus/event/LoadCallback.java b/src/main/java/de/florianmichael/viafabricplus/event/LoadCallback.java index 65159543..41d7932d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/event/LoadCallback.java +++ b/src/main/java/de/florianmichael/viafabricplus/event/LoadCallback.java @@ -38,4 +38,5 @@ public interface LoadCallback { enum State { PRE, POST } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/event/LoadSaveFilesCallback.java b/src/main/java/de/florianmichael/viafabricplus/event/LoadSaveFilesCallback.java index be96bcf8..cd6382e9 100644 --- a/src/main/java/de/florianmichael/viafabricplus/event/LoadSaveFilesCallback.java +++ b/src/main/java/de/florianmichael/viafabricplus/event/LoadSaveFilesCallback.java @@ -39,4 +39,5 @@ public interface LoadSaveFilesCallback { enum State { PRE, POST } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/event/RegisterSettingsCallback.java b/src/main/java/de/florianmichael/viafabricplus/event/RegisterSettingsCallback.java index 184db0c5..62b9411d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/event/RegisterSettingsCallback.java +++ b/src/main/java/de/florianmichael/viafabricplus/event/RegisterSettingsCallback.java @@ -39,4 +39,5 @@ public interface RegisterSettingsCallback { enum State { PRE, POST } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/CPEAdditions.java b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/CPEAdditions.java index 3f2dd594..3fab5076 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/CPEAdditions.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/CPEAdditions.java @@ -33,6 +33,7 @@ import java.util.Map; import java.util.function.BiConsumer; public class CPEAdditions { + public final static List ALLOWED_EXTENSIONS = Arrays.asList(ClassicProtocolExtension.ENV_WEATHER_TYPE); public final static Map CUSTOM_PACKETS = new HashMap<>(); @@ -53,4 +54,5 @@ public class CPEAdditions { return packet; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/GridItemSelectionScreen.java b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/GridItemSelectionScreen.java index 09ebef58..d1255135 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/GridItemSelectionScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/GridItemSelectionScreen.java @@ -32,6 +32,7 @@ import java.util.List; @SuppressWarnings("DataFlowIssue") public class GridItemSelectionScreen extends VFPScreen { + public static final GridItemSelectionScreen INSTANCE = new GridItemSelectionScreen(); private static final int MAX_ROW_DIVIDER = 9; @@ -118,4 +119,5 @@ public class GridItemSelectionScreen extends VFPScreen { y += ITEM_XY_BOX_DIMENSION_CLASSIC; } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/WorldHeightSupport.java b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/WorldHeightSupport.java index 5320f812..44d10b14 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/WorldHeightSupport.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/WorldHeightSupport.java @@ -173,4 +173,5 @@ public class WorldHeightSupport { private static void changeDimensionTagHeight(final UserConnection user, final CompoundTag tag) { tag.put("height", new IntTag(Via.getManager().getProviders().get(ClassicWorldHeightProvider.class).getMaxChunkSectionCount(user) << 4)); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/ListExtensionsCommand.java b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/ListExtensionsCommand.java index 8c5beb12..8298ffd9 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/ListExtensionsCommand.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/ListExtensionsCommand.java @@ -28,6 +28,7 @@ import net.raphimc.vialegacy.protocols.classic.protocolc0_28_30toc0_28_30cpe.sto import net.raphimc.vialoader.util.VersionEnum; public class ListExtensionsCommand extends VFPViaSubCommand { + @Override public String name() { return "listextensions"; @@ -50,4 +51,5 @@ public class ListExtensionsCommand extends VFPViaSubCommand { }); return true; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/SetTimeCommand.java b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/SetTimeCommand.java index ac1ba429..bb87a6d1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/SetTimeCommand.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/classic/command/SetTimeCommand.java @@ -27,6 +27,7 @@ import net.raphimc.vialoader.util.VersionEnum; import net.raphimc.vialegacy.protocols.alpha.protocola1_0_17_1_0_17_4toa1_0_16_2.storage.TimeLockStorage; public class SetTimeCommand extends VFPViaSubCommand { + @Override public String name() { return "settime"; @@ -62,4 +63,5 @@ public class SetTimeCommand extends VFPViaSubCommand { } return true; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatModel1_8.java b/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatModel1_8.java index 56180164..8828480d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatModel1_8.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatModel1_8.java @@ -27,6 +27,7 @@ import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.util.Identifier; public class BoatModel1_8 extends CompositeEntityModel { + public static final EntityModelLayer MODEL_LAYER = new EntityModelLayer(new Identifier("viafabricplus", "boat1_8"), "main"); private final ImmutableList parts; @@ -57,4 +58,5 @@ public class BoatModel1_8 extends CompositeEntityModel { @Override public void setAngles(BoatEntity entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) { } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatRenderer1_8.java b/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatRenderer1_8.java index 5e8149b0..13079c33 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatRenderer1_8.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/entity/BoatRenderer1_8.java @@ -31,6 +31,7 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RotationAxis; public class BoatRenderer1_8 extends EntityRenderer { + private static final Identifier TEXTURE = new Identifier("viafabricplus", "textures/boat1_8.png"); private final BoatModel1_8 model; @@ -69,4 +70,5 @@ public class BoatRenderer1_8 extends EntityRenderer { matrices.pop(); super.render(entity, yaw, tickDelta, matrices, vertexConsumers, light); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameTracker.java b/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameTracker.java index f94e9100..3848d5a0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameTracker.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameTracker.java @@ -55,4 +55,5 @@ public class JoinGameTracker extends StoredObject { public void setEnchantmentSeed(long enchantmentSeed) { this.enchantmentSeed = enchantmentSeed; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java b/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java index d730c09a..81f31e13 100644 --- a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java +++ b/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java @@ -37,4 +37,5 @@ public class TeleportTracker extends StoredObject { public void setPending(Boolean onGround) { this.onGround = onGround; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/ViaFabricPlusMixinPlugin.java b/src/main/java/de/florianmichael/viafabricplus/injection/ViaFabricPlusMixinPlugin.java index c7ccadfc..08a3ae40 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/ViaFabricPlusMixinPlugin.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/ViaFabricPlusMixinPlugin.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Set; public class ViaFabricPlusMixinPlugin implements IMixinConfigPlugin { + public static final String INJECTOR_PACKAGE = "de.florianmichael.viafabricplus.injection.mixin."; private static final String MC_FIXES_PACKAGE = "fixes.minecraft."; @@ -93,4 +94,5 @@ public class ViaFabricPlusMixinPlugin implements IMixinConfigPlugin { @Override public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java index 8b4e13f5..cf33fe51 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java @@ -152,4 +152,5 @@ public abstract class MixinDebugHud { cir.getReturnValue().addAll(information); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/perserverversion/MixinServerInfo.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/perserverversion/MixinServerInfo.java index 22bfea8e..85bbb132 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/perserverversion/MixinServerInfo.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/perserverversion/MixinServerInfo.java @@ -105,4 +105,5 @@ public abstract class MixinServerInfo implements IServerInfo { public void viaFabricPlus$setTranslatingVersion(VersionEnum version) { viaFabricPlus$translatingVersion = version; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java index 8012a594..501f44e9 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java @@ -54,4 +54,5 @@ public abstract class MixinAutoRefillHandler_ItemSlotMonitor { if (currentSlotId == 45) ci.cancel(); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinClasses.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinClasses.java index 16676673..2f5f5226 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinClasses.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinClasses.java @@ -36,4 +36,5 @@ public abstract class MixinClasses { private static void removeServicesSupport(String fqcn, CallbackInfoReturnable> cir) throws ClassNotFoundException { cir.setReturnValue((Class) Class.forName(fqcn)); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinDefaultJwtParserBuilder.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinDefaultJwtParserBuilder.java index 1da9e02d..9b33e797 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinDefaultJwtParserBuilder.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/jsonwebtoken/MixinDefaultJwtParserBuilder.java @@ -36,4 +36,5 @@ public abstract class MixinDefaultJwtParserBuilder { public Object removeServicesSupport(Class result) { return new GsonDeserializer<>(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java index 048335b4..d07a873b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java @@ -72,4 +72,5 @@ public abstract class MixinCamera { } } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinEndPortalBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinEndPortalBlock.java index 40c2a466..9b0db6ec 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinEndPortalBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinEndPortalBlock.java @@ -52,4 +52,5 @@ public abstract class MixinEndPortalBlock extends BlockWithEntity { cir.setReturnValue(viaFabricPlus$shape_r1_16_5); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFarmlandBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFarmlandBlock.java index c16bc172..33f37b1c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFarmlandBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFarmlandBlock.java @@ -62,4 +62,5 @@ public abstract class MixinFarmlandBlock extends Block { return super.getCullingShape(state, view, pos); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSoulSandBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSoulSandBlock.java index 70bd4c3c..4d21e056 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSoulSandBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSoulSandBlock.java @@ -64,4 +64,5 @@ public abstract class MixinSoulSandBlock extends Block { return super.getVelocityMultiplier(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBlobCache.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBlobCache.java index c315e17b..a5bd2a60 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBlobCache.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBlobCache.java @@ -39,4 +39,5 @@ public class MixinBlobCache implements IBlobCache { public Map> viaFabricPlus$getPending() { return pending; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/VFPViaSubCommand.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/VFPViaSubCommand.java index e1aab8f4..5e833642 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/VFPViaSubCommand.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/VFPViaSubCommand.java @@ -37,4 +37,5 @@ public abstract class VFPViaSubCommand extends ViaSubCommand { public UserConnection getUser() { return ProtocolHack.getPlayNetworkUserConnection(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusVLCommandHandler.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusVLCommandHandler.java index 5e359e32..23fea569 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusVLCommandHandler.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusVLCommandHandler.java @@ -72,4 +72,5 @@ public class ViaFabricPlusVLCommandHandler extends VLCommandHandler { .forEach(builder::add); return builder.buildFuture(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusViaCommandSender.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusViaCommandSender.java index 02a20f55..dc6fce30 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusViaCommandSender.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/command/ViaFabricPlusViaCommandSender.java @@ -27,6 +27,7 @@ import com.viaversion.viaversion.api.command.ViaCommandSender; import java.util.UUID; public class ViaFabricPlusViaCommandSender implements ViaCommandSender { + private final CommandSource source; public ViaFabricPlusViaCommandSender(final CommandSource source) { @@ -52,4 +53,5 @@ public class ViaFabricPlusViaCommandSender implements ViaCommandSender { public String getName() { return ((FabricClientCommandSource) source).getPlayer().getEntityName(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/ViaFabricPlusVLInjector.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/ViaFabricPlusVLInjector.java index 9fcdbcc5..ec97824d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/ViaFabricPlusVLInjector.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/ViaFabricPlusVLInjector.java @@ -68,4 +68,5 @@ public class ViaFabricPlusVLInjector extends VLInjector { return platformSpecific; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java index 64b18ba3..de0cd8f7 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java @@ -27,4 +27,5 @@ public class ViaFabricPlusViaLegacyPlatformImpl extends ViaLegacyPlatformImpl { public String getCpeAppName() { return "ViaFabricPlus"; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusViaDecoder.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusViaDecoder.java index 007fad27..f3312906 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusViaDecoder.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusViaDecoder.java @@ -52,4 +52,5 @@ public class ViaFabricPlusViaDecoder extends ViaDecoder { throw t; } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusClassicWorldHeightProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusClassicWorldHeightProvider.java index 3f9fb821..57622173 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusClassicWorldHeightProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusClassicWorldHeightProvider.java @@ -28,4 +28,5 @@ public class ViaFabricPlusClassicWorldHeightProvider extends ClassicWorldHeightP public short getMaxChunkSectionCount(UserConnection user) { return 64; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusEncryptionProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusEncryptionProvider.java index 159c4cff..2ed67521 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusEncryptionProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusEncryptionProvider.java @@ -30,4 +30,5 @@ public class ViaFabricPlusEncryptionProvider extends EncryptionProvider { public void enableDecryption(UserConnection user) { ((IClientConnection) user.getChannel().attr(ProtocolHack.CLIENT_CONNECTION_ATTRIBUTE_KEY).get()).viaFabricPlus$setupPreNettyDecryption(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusGameProfileFetcher.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusGameProfileFetcher.java index ef5ae142..8ce088bc 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusGameProfileFetcher.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusGameProfileFetcher.java @@ -34,6 +34,7 @@ import java.util.UUID; import java.util.concurrent.CompletableFuture; public class ViaFabricPlusGameProfileFetcher extends GameProfileFetcher { + public static final HttpAuthenticationService AUTHENTICATION_SERVICE = new YggdrasilAuthenticationService(Proxy.NO_PROXY); public static final MinecraftSessionService SESSION_SERVICE = AUTHENTICATION_SERVICE.createMinecraftSessionService(); public static final GameProfileRepository GAME_PROFILE_REPOSITORY = AUTHENTICATION_SERVICE.createProfileRepository(); @@ -72,4 +73,5 @@ public class ViaFabricPlusGameProfileFetcher extends GameProfileFetcher { } return gameProfile; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusOldAuthProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusOldAuthProvider.java index 8d2a099b..99153147 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusOldAuthProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/vialegacy/ViaFabricPlusOldAuthProvider.java @@ -43,4 +43,5 @@ public class ViaFabricPlusOldAuthProvider extends OldAuthProvider { ViaFabricPlus.global().getLogger().error("Error occurred while calling join server to verify session", e); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusCommandArgumentsProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusCommandArgumentsProvider.java index d2b82447..75337b89 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusCommandArgumentsProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusCommandArgumentsProvider.java @@ -42,4 +42,5 @@ public class ViaFabricPlusCommandArgumentsProvider extends SignableCommandArgume } return Collections.emptyList(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerAbilitiesProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerAbilitiesProvider.java index edbcd53e..473db9dd 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerAbilitiesProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerAbilitiesProvider.java @@ -34,4 +34,5 @@ public class ViaFabricPlusPlayerAbilitiesProvider extends PlayerAbilitiesProvide public float getWalkingSpeed(UserConnection connection) { return MinecraftClient.getInstance().player.getAbilities().getWalkSpeed(); } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerLookTargetProvider.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerLookTargetProvider.java index 204134fd..3666387f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerLookTargetProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/provider/viaversion/ViaFabricPlusPlayerLookTargetProvider.java @@ -37,4 +37,5 @@ public class ViaFabricPlusPlayerLookTargetProvider extends PlayerLookTargetProvi return null; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java b/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java index 066b5c46..6a425f8a 100644 --- a/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java +++ b/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java @@ -31,6 +31,7 @@ import java.io.*; */ @SuppressWarnings("ResultOfMethodCallIgnored") public abstract class AbstractSave { + public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); private final File file; @@ -87,4 +88,5 @@ public abstract class AbstractSave { public File getFile() { return file; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/save/SaveManager.java b/src/main/java/de/florianmichael/viafabricplus/save/SaveManager.java index 9be1908b..d37f0141 100644 --- a/src/main/java/de/florianmichael/viafabricplus/save/SaveManager.java +++ b/src/main/java/de/florianmichael/viafabricplus/save/SaveManager.java @@ -29,6 +29,7 @@ import java.util.Arrays; import java.util.List; public class SaveManager { + private final List saves = new ArrayList<>(); private final SettingsSave settingsSave; @@ -69,4 +70,5 @@ public class SaveManager { public AccountsSave getAccountsSave() { return accountsSave; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/save/impl/AccountsSave.java b/src/main/java/de/florianmichael/viafabricplus/save/impl/AccountsSave.java index 565c33f3..86f71c71 100644 --- a/src/main/java/de/florianmichael/viafabricplus/save/impl/AccountsSave.java +++ b/src/main/java/de/florianmichael/viafabricplus/save/impl/AccountsSave.java @@ -92,4 +92,5 @@ public class AccountsSave extends AbstractSave { public void setClassicubeAccount(CCAccount classicubeAccount) { this.classicubeAccount = classicubeAccount; } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/save/impl/SettingsSave.java b/src/main/java/de/florianmichael/viafabricplus/save/impl/SettingsSave.java index 22629bca..ef4e2db0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/save/impl/SettingsSave.java +++ b/src/main/java/de/florianmichael/viafabricplus/save/impl/SettingsSave.java @@ -31,6 +31,7 @@ import de.florianmichael.viafabricplus.util.ChatUtil; import net.raphimc.vialoader.util.VersionEnum; public class SettingsSave extends AbstractSave { + private final SettingsManager settingsManager; public SettingsSave(final SettingsManager settingsManager) { @@ -75,4 +76,5 @@ public class SettingsSave extends AbstractSave { ProtocolHack.setTargetVersion(ProtocolHack.NATIVE_VERSION); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/screen/VFPListEntry.java b/src/main/java/de/florianmichael/viafabricplus/screen/VFPListEntry.java index f99b8695..c545cb37 100644 --- a/src/main/java/de/florianmichael/viafabricplus/screen/VFPListEntry.java +++ b/src/main/java/de/florianmichael/viafabricplus/screen/VFPListEntry.java @@ -33,6 +33,7 @@ import javax.annotation.Nullable; * functions and features used in all screens which are added by ViaFabricPlus */ public abstract class VFPListEntry extends AlwaysSelectedEntryListWidget.Entry { + protected static final int SCISSORS_OFFSET = 4; public static final int SLOT_MARGIN = 3; @@ -116,4 +117,5 @@ public abstract class VFPListEntry extends AlwaysSelectedEntryListWidget.Entry selectionConsumer; public PerServerVersionScreen(final Screen prevScreen, final Consumer selectionConsumer) { @@ -124,4 +125,5 @@ public class PerServerVersionScreen extends VFPScreen { context.drawCenteredTextWithShadow(textRenderer, this.versionEnum.getName(), x + entryWidth / 2, y - 1 + entryHeight / 2 - textRenderer.fontHeight / 2, -1); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/screen/base/ProtocolSelectionScreen.java b/src/main/java/de/florianmichael/viafabricplus/screen/base/ProtocolSelectionScreen.java index a9ba513a..d13b1d2a 100644 --- a/src/main/java/de/florianmichael/viafabricplus/screen/base/ProtocolSelectionScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/screen/base/ProtocolSelectionScreen.java @@ -40,6 +40,7 @@ import net.raphimc.vialoader.util.VersionEnum; import java.awt.*; public class ProtocolSelectionScreen extends VFPScreen { + public static final ProtocolSelectionScreen INSTANCE = new ProtocolSelectionScreen(); private ButtonWidget betaCraftButton; @@ -148,4 +149,5 @@ public class ProtocolSelectionScreen extends VFPScreen { matrices.pop(); } } + } diff --git a/src/main/java/de/florianmichael/viafabricplus/screen/settings/SettingsScreen.java b/src/main/java/de/florianmichael/viafabricplus/screen/settings/SettingsScreen.java index b450a137..8f298889 100644 --- a/src/main/java/de/florianmichael/viafabricplus/screen/settings/SettingsScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/screen/settings/SettingsScreen.java @@ -29,6 +29,7 @@ import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget; public class SettingsScreen extends VFPScreen { + public static final SettingsScreen INSTANCE = new SettingsScreen(); public SettingsScreen() { @@ -75,4 +76,5 @@ public class SettingsScreen extends VFPScreen { return this.width - 5; } } + }