From 65fe211faed8d84e48088858c92a71d9bc6a87b2 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:34:25 +0200 Subject: [PATCH] some code style changes --- .../mixin/base/MixinClientConnection.java | 4 ++-- .../fixes/minecraft/block/MixinAnvilBlock.java | 4 ++-- .../minecraft/block/MixinBrewingStandBlock.java | 2 +- .../fixes/minecraft/block/MixinFarmlandBlock.java | 2 +- .../fixes/minecraft/block/MixinFenceBlock.java | 2 +- .../fixes/minecraft/block/MixinLadderBlock.java | 8 ++++---- .../fixes/minecraft/block/MixinLilyPadBlock.java | 2 +- .../fixes/minecraft/block/MixinSnowBlock.java | 2 +- .../fixes/minecraft/block/MixinWallBlock.java | 4 ++-- .../fixes/minecraft/entity/MixinPlayerEntity.java | 4 ++-- .../mixin/fixes/minecraft/item/MixinHoeItem.java | 2 +- .../fixes/minecraft/item/MixinPickaxeItem.java | 6 +++--- .../MixinProtocol1_19_3To1_19_1.java | 8 ++++---- .../mappings/ArmorPointsMappings.java | 2 +- .../netty/ViaFabricPlusVLBPipeline.java | 14 +++++++------- .../codec/RakMessageEncapsulationCodec.java | 2 +- .../platform/ViaAprilFoolsPlatformImpl.java | 2 +- .../platform/ViaBedrockPlatformImpl.java | 2 +- .../platform/ViaLegacyPlatformImpl.java | 2 +- .../vialegacy/ViaFabricPlusGameProfileFetcher.java | 6 +++--- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection.java index e5a9ec7c..672055b8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection.java @@ -113,8 +113,8 @@ public abstract class MixinClientConnection extends SimpleChannelInboundHandler< @Override public void viafabricplus_setupPreNettyEncryption() { - this.channel.pipeline().addBefore(ViaFabricPlusVLBPipeline.VIA_LEGACY_DECODER_HANDLER_NAME, "decrypt", new PacketDecryptor(this.viafabricplus_decryptionCipher)); - this.channel.pipeline().addBefore(ViaFabricPlusVLBPipeline.VIA_LEGACY_ENCODER_HANDLER_NAME, "encrypt", new PacketEncryptor(this.viafabricplus_encryptionCipher)); + this.channel.pipeline().addBefore(ViaFabricPlusVLBPipeline.VIA_LEGACY_PRE_NETTY_LENGTH_PREPENDER_HANDLER_NAME, "decrypt", new PacketDecryptor(this.viafabricplus_decryptionCipher)); + this.channel.pipeline().addBefore(ViaFabricPlusVLBPipeline.VIA_LEGACY_PRE_NETTY_LENGTH_REMOVER_HANDLER_NAME, "encrypt", new PacketEncryptor(this.viafabricplus_encryptionCipher)); } @Override diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinAnvilBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinAnvilBlock.java index 060e8de3..098f93e8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinAnvilBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinAnvilBlock.java @@ -40,10 +40,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinAnvilBlock { @Unique - private static final VoxelShape viafabricplus_x_axis_shape_v1_12_2 = Block.createCuboidShape(0, 0, 2, 16, 16, 14); + private final static VoxelShape viafabricplus_x_axis_shape_v1_12_2 = Block.createCuboidShape(0, 0, 2, 16, 16, 14); @Unique - private static final VoxelShape viafabricplus_z_axis_shape_v1_12_2 = Block.createCuboidShape(2, 0, 0, 14, 16, 16); + private final static VoxelShape viafabricplus_z_axis_shape_v1_12_2 = Block.createCuboidShape(2, 0, 0, 14, 16, 16); @Shadow @Final diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinBrewingStandBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinBrewingStandBlock.java index 56c976db..78dc0bc2 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinBrewingStandBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinBrewingStandBlock.java @@ -37,7 +37,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinBrewingStandBlock { @Unique - private static final VoxelShape viafabricplus_base_shape_v1_12_2 = VoxelShapes.union( + private final static VoxelShape viafabricplus_base_shape_v1_12_2 = VoxelShapes.union( Block.createCuboidShape(0, 0, 0, 16, 2, 16) /* Base */, Block.createCuboidShape(7, 0, 7, 9, 14, 9) /* Stick */ ); 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 4abba00d..4b8a3fd5 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 @@ -39,7 +39,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinFarmlandBlock extends Block { @Unique - private static final VoxelShape viafabricplus_shape_v1_9_4 = VoxelShapes.fullCube(); + private final static VoxelShape viafabricplus_shape_v1_9_4 = VoxelShapes.fullCube(); @Shadow @Final protected static VoxelShape SHAPE; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFenceBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFenceBlock.java index 7979bf17..c23cab58 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFenceBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinFenceBlock.java @@ -47,7 +47,7 @@ public class MixinFenceBlock extends HorizontalConnectingBlock { } @Unique - private static final VoxelShape viafabricplus_fence_shape_b1_8_1 = Block.createCuboidShape(0, 0, 0, 16, 32, 16); + private final static VoxelShape viafabricplus_fence_shape_b1_8_1 = Block.createCuboidShape(0, 0, 0, 16, 32, 16); @Override public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLadderBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLadderBlock.java index 61702f91..32d215dc 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLadderBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLadderBlock.java @@ -36,16 +36,16 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinLadderBlock { @Unique - private static final VoxelShape viafabricplus_east_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 2, 16, 16); + private final static VoxelShape viafabricplus_east_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 2, 16, 16); @Unique - private static final VoxelShape viafabricplus_west_shape_v1_8_x = Block.createCuboidShape(14, 0, 0, 16, 16, 16); + private final static VoxelShape viafabricplus_west_shape_v1_8_x = Block.createCuboidShape(14, 0, 0, 16, 16, 16); @Unique - private static final VoxelShape viafabricplus_south_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 16, 16, 2); + private final static VoxelShape viafabricplus_south_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 16, 16, 2); @Unique - private static final VoxelShape viafabricplus_north_shape_v1_8_x = Block.createCuboidShape(0, 0, 14, 16, 16, 16); + private final static VoxelShape viafabricplus_north_shape_v1_8_x = Block.createCuboidShape(0, 0, 14, 16, 16, 16); @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) private void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable ci) { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLilyPadBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLilyPadBlock.java index 31b9f81e..ebde95a8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLilyPadBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinLilyPadBlock.java @@ -36,7 +36,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinLilyPadBlock { @Unique - private static final VoxelShape viafabricplus_shape_v1_8_x = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 0.015625D /* 1 / 64 */ * 16, 16.0D); + private final static VoxelShape viafabricplus_shape_v1_8_x = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 0.015625D /* 1 / 64 */ * 16, 16.0D); @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void changeBoundingBox(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSnowBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSnowBlock.java index 0c6e7b01..0e9183bb 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSnowBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinSnowBlock.java @@ -39,7 +39,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinSnowBlock { @Unique - private static final VoxelShape[] viafabricplus_layers_to_shape_v1_12_2 = new VoxelShape[]{ + private final static VoxelShape[] viafabricplus_layers_to_shape_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(0, -0.00001 /* Bypass for Minecraft-Fixes */, 0, 16, 0, 16), Block.createCuboidShape(0, 0, 0, 16, 2, 16), Block.createCuboidShape(0, 0, 0, 16, 4, 16), diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinWallBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinWallBlock.java index 94a8d645..919bbed0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinWallBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/block/MixinWallBlock.java @@ -45,7 +45,7 @@ import java.util.Map; public class MixinWallBlock extends Block { @Unique - private static final VoxelShape[] viafabricplus_shape_by_index_v1_12_2 = new VoxelShape[]{ + private final static VoxelShape[] viafabricplus_shape_by_index_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(4, 0, 4, 12, 16, 12), Block.createCuboidShape(4, 0, 4, 12, 16, 16), Block.createCuboidShape(0, 0, 4, 12, 16, 12), @@ -69,7 +69,7 @@ public class MixinWallBlock extends Block { }; @Unique - private static final VoxelShape[] viafabricplus_cip_shape_by_index_v1_12_2 = new VoxelShape[]{ + private final static VoxelShape[] viafabricplus_cip_shape_by_index_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(4, 0, 4, 12, 24, 12), Block.createCuboidShape(4, 0, 4, 12, 24, 16), Block.createCuboidShape(0, 0, 4, 12, 24, 12), diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java index 59f22749..cf1092aa 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java @@ -44,10 +44,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public abstract class MixinPlayerEntity extends LivingEntity { @Unique - private static final EntityDimensions viafabricplus_sneaking_dimensions_v1_13_2 = EntityDimensions.changing(0.6f, 1.65f); + private final static EntityDimensions viafabricplus_sneaking_dimensions_v1_13_2 = EntityDimensions.changing(0.6f, 1.65f); @Unique - private static final SoundEvent viafabricplus_random_hurt = SoundEvent.of(new Identifier("viafabricplus", "random.hurt")); + private final static SoundEvent viafabricplus_random_hurt = SoundEvent.of(new Identifier("viafabricplus", "random.hurt")); @Shadow @Final diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinHoeItem.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinHoeItem.java index b3ed79c1..f8cdfd97 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinHoeItem.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinHoeItem.java @@ -37,7 +37,7 @@ import java.util.Set; public abstract class MixinHoeItem extends MiningToolItem { @Unique - private static final Set viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of( + private final static Set viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of( Blocks.NETHER_WART_BLOCK, Blocks.WARPED_WART_BLOCK, Blocks.HAY_BLOCK, diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinPickaxeItem.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinPickaxeItem.java index 0d96952b..d657f300 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinPickaxeItem.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinPickaxeItem.java @@ -38,13 +38,13 @@ import java.util.Set; public abstract class MixinPickaxeItem extends MiningToolItem { @Unique - private static final Set viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.POWERED_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.NETHER_GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.BLUE_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.GRANITE, Blocks.POLISHED_GRANITE, Blocks.DIORITE, Blocks.POLISHED_DIORITE, Blocks.ANDESITE, Blocks.POLISHED_ANDESITE, Blocks.STONE_SLAB, Blocks.SMOOTH_STONE_SLAB, Blocks.SANDSTONE_SLAB, Blocks.PETRIFIED_OAK_SLAB, Blocks.COBBLESTONE_SLAB, Blocks.BRICK_SLAB, Blocks.STONE_BRICK_SLAB, Blocks.NETHER_BRICK_SLAB, Blocks.QUARTZ_SLAB, Blocks.RED_SANDSTONE_SLAB, Blocks.PURPUR_SLAB, Blocks.SMOOTH_QUARTZ, Blocks.SMOOTH_RED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.SMOOTH_STONE, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE, Blocks.POLISHED_GRANITE_SLAB, Blocks.SMOOTH_RED_SANDSTONE_SLAB, Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.POLISHED_DIORITE_SLAB, Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.END_STONE_BRICK_SLAB, Blocks.SMOOTH_SANDSTONE_SLAB, Blocks.SMOOTH_QUARTZ_SLAB, Blocks.GRANITE_SLAB, Blocks.ANDESITE_SLAB, Blocks.RED_NETHER_BRICK_SLAB, Blocks.POLISHED_ANDESITE_SLAB, Blocks.DIORITE_SLAB, Blocks.SHULKER_BOX, Blocks.BLACK_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX, Blocks.BROWN_SHULKER_BOX, Blocks.CYAN_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX, Blocks.LIME_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.PINK_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.RED_SHULKER_BOX, Blocks.WHITE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX, Blocks.PISTON, Blocks.STICKY_PISTON, Blocks.PISTON_HEAD); + private final static Set viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.POWERED_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.NETHER_GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.BLUE_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.GRANITE, Blocks.POLISHED_GRANITE, Blocks.DIORITE, Blocks.POLISHED_DIORITE, Blocks.ANDESITE, Blocks.POLISHED_ANDESITE, Blocks.STONE_SLAB, Blocks.SMOOTH_STONE_SLAB, Blocks.SANDSTONE_SLAB, Blocks.PETRIFIED_OAK_SLAB, Blocks.COBBLESTONE_SLAB, Blocks.BRICK_SLAB, Blocks.STONE_BRICK_SLAB, Blocks.NETHER_BRICK_SLAB, Blocks.QUARTZ_SLAB, Blocks.RED_SANDSTONE_SLAB, Blocks.PURPUR_SLAB, Blocks.SMOOTH_QUARTZ, Blocks.SMOOTH_RED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.SMOOTH_STONE, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE, Blocks.POLISHED_GRANITE_SLAB, Blocks.SMOOTH_RED_SANDSTONE_SLAB, Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.POLISHED_DIORITE_SLAB, Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.END_STONE_BRICK_SLAB, Blocks.SMOOTH_SANDSTONE_SLAB, Blocks.SMOOTH_QUARTZ_SLAB, Blocks.GRANITE_SLAB, Blocks.ANDESITE_SLAB, Blocks.RED_NETHER_BRICK_SLAB, Blocks.POLISHED_ANDESITE_SLAB, Blocks.DIORITE_SLAB, Blocks.SHULKER_BOX, Blocks.BLACK_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX, Blocks.BROWN_SHULKER_BOX, Blocks.CYAN_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX, Blocks.LIME_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.PINK_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.RED_SHULKER_BOX, Blocks.WHITE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX, Blocks.PISTON, Blocks.STICKY_PISTON, Blocks.PISTON_HEAD); @Unique - private static final Set viafabricplus_EFFECTIVE_MATERIALS = ImmutableSet.of(Material.METAL, Material.REPAIR_STATION, Material.STONE); + private final static Set viafabricplus_EFFECTIVE_MATERIALS = ImmutableSet.of(Material.METAL, Material.REPAIR_STATION, Material.STONE); @Unique - private static final Set viafabricplus_EFFECTIVE_BLOCKS_1152 = ImmutableSet.of(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.POWERED_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.BLUE_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.GRANITE, Blocks.POLISHED_GRANITE, Blocks.DIORITE, Blocks.POLISHED_DIORITE, Blocks.ANDESITE, Blocks.POLISHED_ANDESITE, Blocks.STONE_SLAB, Blocks.SMOOTH_STONE_SLAB, Blocks.SANDSTONE_SLAB, Blocks.PETRIFIED_OAK_SLAB, Blocks.COBBLESTONE_SLAB, Blocks.BRICK_SLAB, Blocks.STONE_BRICK_SLAB, Blocks.NETHER_BRICK_SLAB, Blocks.QUARTZ_SLAB, Blocks.RED_SANDSTONE_SLAB, Blocks.PURPUR_SLAB, Blocks.SMOOTH_QUARTZ, Blocks.SMOOTH_RED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.SMOOTH_STONE, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE, Blocks.POLISHED_GRANITE_SLAB, Blocks.SMOOTH_RED_SANDSTONE_SLAB, Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.POLISHED_DIORITE_SLAB, Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.END_STONE_BRICK_SLAB, Blocks.SMOOTH_SANDSTONE_SLAB, Blocks.SMOOTH_QUARTZ_SLAB, Blocks.GRANITE_SLAB, Blocks.ANDESITE_SLAB, Blocks.RED_NETHER_BRICK_SLAB, Blocks.POLISHED_ANDESITE_SLAB, Blocks.DIORITE_SLAB, Blocks.SHULKER_BOX, Blocks.BLACK_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX, Blocks.BROWN_SHULKER_BOX, Blocks.CYAN_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX, Blocks.LIME_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.PINK_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.RED_SHULKER_BOX, Blocks.WHITE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX); + private final static Set viafabricplus_EFFECTIVE_BLOCKS_1152 = ImmutableSet.of(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.POWERED_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.BLUE_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.GRANITE, Blocks.POLISHED_GRANITE, Blocks.DIORITE, Blocks.POLISHED_DIORITE, Blocks.ANDESITE, Blocks.POLISHED_ANDESITE, Blocks.STONE_SLAB, Blocks.SMOOTH_STONE_SLAB, Blocks.SANDSTONE_SLAB, Blocks.PETRIFIED_OAK_SLAB, Blocks.COBBLESTONE_SLAB, Blocks.BRICK_SLAB, Blocks.STONE_BRICK_SLAB, Blocks.NETHER_BRICK_SLAB, Blocks.QUARTZ_SLAB, Blocks.RED_SANDSTONE_SLAB, Blocks.PURPUR_SLAB, Blocks.SMOOTH_QUARTZ, Blocks.SMOOTH_RED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.SMOOTH_STONE, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE, Blocks.POLISHED_GRANITE_SLAB, Blocks.SMOOTH_RED_SANDSTONE_SLAB, Blocks.MOSSY_STONE_BRICK_SLAB, Blocks.POLISHED_DIORITE_SLAB, Blocks.MOSSY_COBBLESTONE_SLAB, Blocks.END_STONE_BRICK_SLAB, Blocks.SMOOTH_SANDSTONE_SLAB, Blocks.SMOOTH_QUARTZ_SLAB, Blocks.GRANITE_SLAB, Blocks.ANDESITE_SLAB, Blocks.RED_NETHER_BRICK_SLAB, Blocks.POLISHED_ANDESITE_SLAB, Blocks.DIORITE_SLAB, Blocks.SHULKER_BOX, Blocks.BLACK_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX, Blocks.BROWN_SHULKER_BOX, Blocks.CYAN_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX, Blocks.LIME_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.PINK_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.RED_SHULKER_BOX, Blocks.WHITE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX); protected MixinPickaxeItem(float attackDamage, float attackSpeed, ToolMaterial material, TagKey effectiveBlocks, Settings settings) { super(attackDamage, attackSpeed, material, effectiveBlocks, settings); diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_19_3to1_19_1/MixinProtocol1_19_3To1_19_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_19_3to1_19_1/MixinProtocol1_19_3To1_19_1.java index 8c03d19c..269c39d4 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_19_3to1_19_1/MixinProtocol1_19_3To1_19_1.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_19_3to1_19_1/MixinProtocol1_19_3To1_19_1.java @@ -55,16 +55,16 @@ import java.util.UUID; public class MixinProtocol1_19_3To1_19_1 extends AbstractProtocol { @Unique - private static final ByteArrayType.OptionalByteArrayType OPTIONAL_MESSAGE_SIGNATURE_BYTES_TYPE = new ByteArrayType.OptionalByteArrayType(256); + private final static ByteArrayType.OptionalByteArrayType OPTIONAL_MESSAGE_SIGNATURE_BYTES_TYPE = new ByteArrayType.OptionalByteArrayType(256); @Unique - private static final ByteArrayType MESSAGE_SIGNATURE_BYTES_TYPE = new ByteArrayType(256); + private final static ByteArrayType MESSAGE_SIGNATURE_BYTES_TYPE = new ByteArrayType(256); @Unique - private static final BitSetType ACKNOWLEDGED_BIT_SET_TYPE = new BitSetType(20); + private final static BitSetType ACKNOWLEDGED_BIT_SET_TYPE = new BitSetType(20); @Unique - private static final UUID ZERO_UUID = new UUID(0, 0); + private final static UUID ZERO_UUID = new UUID(0, 0); @Inject(method = "registerPackets", at = @At("RETURN")) public void fixKeys(CallbackInfo ci) { diff --git a/src/main/java/de/florianmichael/viafabricplus/mappings/ArmorPointsMappings.java b/src/main/java/de/florianmichael/viafabricplus/mappings/ArmorPointsMappings.java index d0aa801f..cad51884 100644 --- a/src/main/java/de/florianmichael/viafabricplus/mappings/ArmorPointsMappings.java +++ b/src/main/java/de/florianmichael/viafabricplus/mappings/ArmorPointsMappings.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Map; public class ArmorPointsMappings { - public static final List ARMOR_ITEMS_IN_1_8 = Arrays.asList( + public final static List ARMOR_ITEMS_IN_1_8 = Arrays.asList( Items.LEATHER_HELMET, Items.LEATHER_CHESTPLATE, Items.LEATHER_BOOTS, diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusVLBPipeline.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusVLBPipeline.java index 69723fa7..b08c98c1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusVLBPipeline.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/ViaFabricPlusVLBPipeline.java @@ -46,7 +46,7 @@ import java.net.InetSocketAddress; public class ViaFabricPlusVLBPipeline extends VLBPipeline { // ViaBedrock (RakNet and Codec based) - public final static String VIA_BEDROCK_DISCONNECT_HANDLER_NAME = "via-bedrock-disconnect-handler"; + public final static String VIA_BEDROCK_DISCONNECT_ADAPTER_NAME = "via-bedrock-disconnect-adapter"; public final static String VIA_BEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME = "via-bedrock-frame-encapsulation"; public final static String VIA_BEDROCK_PING_ENCAPSULATION_HANDLER_NAME = "via-bedrock-ping-encapsulation"; public final static String VIA_BEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME = "via-bedrock-packet-encapsulation"; @@ -55,8 +55,8 @@ public class ViaFabricPlusVLBPipeline extends VLBPipeline { public final static String VIA_BEDROCK_ENCRYPTION_HANDLER_NAME = "via-bedrock-encryption"; // ViaLegacy (pre Netty) - public static final String VIA_LEGACY_DECODER_HANDLER_NAME = "via-legacy-decoder"; - public static final String VIA_LEGACY_ENCODER_HANDLER_NAME = "via-legacy-encoder"; + public final static String VIA_LEGACY_PRE_NETTY_LENGTH_PREPENDER_HANDLER_NAME = "via-legacy-decoder"; + public final static String VIA_LEGACY_PRE_NETTY_LENGTH_REMOVER_HANDLER_NAME = "via-legacy-encoder"; private final InetSocketAddress address; private final ComparableProtocolVersion version; @@ -79,8 +79,8 @@ public class ViaFabricPlusVLBPipeline extends VLBPipeline { if (this.version.isOlderThanOrEqualTo(LegacyProtocolVersion.r1_6_4)) { getUser().getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE); - pipeline.addBefore("splitter", VIA_LEGACY_DECODER_HANDLER_NAME, new PreNettyLengthPrepender(getUser())); - pipeline.addBefore("prepender", VIA_LEGACY_ENCODER_HANDLER_NAME, new PreNettyLengthRemover(getUser())); + pipeline.addBefore("splitter", VIA_LEGACY_PRE_NETTY_LENGTH_PREPENDER_HANDLER_NAME, new PreNettyLengthPrepender(getUser())); + pipeline.addBefore("prepender", VIA_LEGACY_PRE_NETTY_LENGTH_REMOVER_HANDLER_NAME, new PreNettyLengthRemover(getUser())); } // ViaBedrock @@ -89,8 +89,8 @@ public class ViaFabricPlusVLBPipeline extends VLBPipeline { pipeline.replace("splitter", VIA_BEDROCK_BATCH_LENGTH_HANDLER_NAME, new BatchLengthCodec()); - pipeline.addBefore(VIA_BEDROCK_BATCH_LENGTH_HANDLER_NAME, VIA_BEDROCK_DISCONNECT_HANDLER_NAME, new DisconnectAdapter()); - pipeline.addAfter(VIA_BEDROCK_DISCONNECT_HANDLER_NAME, VIA_BEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, new RakMessageEncapsulationCodec()); + pipeline.addBefore(VIA_BEDROCK_BATCH_LENGTH_HANDLER_NAME, VIA_BEDROCK_DISCONNECT_ADAPTER_NAME, new DisconnectAdapter()); + pipeline.addAfter(VIA_BEDROCK_DISCONNECT_ADAPTER_NAME, VIA_BEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, new RakMessageEncapsulationCodec()); pipeline.addAfter(VIA_BEDROCK_BATCH_LENGTH_HANDLER_NAME, VIA_BEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME, new PacketEncapsulationCodec()); // Replaced by the codecs diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/viabedrock/codec/RakMessageEncapsulationCodec.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/viabedrock/codec/RakMessageEncapsulationCodec.java index c5357239..1a237ed4 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/viabedrock/codec/RakMessageEncapsulationCodec.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/netty/viabedrock/codec/RakMessageEncapsulationCodec.java @@ -28,7 +28,7 @@ import java.util.List; public class RakMessageEncapsulationCodec extends MessageToMessageCodec { - private static final int FRAME_ID = 0xFE; + private final static int FRAME_ID = 0xFE; @Override protected void encode(ChannelHandlerContext ctx, ByteBuf msg, List out) { diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaAprilFoolsPlatformImpl.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaAprilFoolsPlatformImpl.java index bd939b31..08e8c24f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaAprilFoolsPlatformImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaAprilFoolsPlatformImpl.java @@ -26,7 +26,7 @@ import java.io.File; import java.util.logging.Logger; public class ViaAprilFoolsPlatformImpl implements ViaAprilFoolsPlatform { - private static final Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaAprilFools")); + private final static Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaAprilFools")); public ViaAprilFoolsPlatformImpl() { this.init(this.getDataFolder()); diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaBedrockPlatformImpl.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaBedrockPlatformImpl.java index c4dc2f7a..551c8704 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaBedrockPlatformImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaBedrockPlatformImpl.java @@ -26,7 +26,7 @@ import java.io.File; import java.util.logging.Logger; public class ViaBedrockPlatformImpl implements ViaBedrockPlatform { - private static final Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaBedrock")); + private final static Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaBedrock")); public ViaBedrockPlatformImpl() { this.init(this.getDataFolder()); diff --git a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaLegacyPlatformImpl.java b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaLegacyPlatformImpl.java index cbb00607..3f145464 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaLegacyPlatformImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocolhack/platform/ViaLegacyPlatformImpl.java @@ -26,7 +26,7 @@ import java.io.File; import java.util.logging.Logger; public class ViaLegacyPlatformImpl implements ViaLegacyPlatform { - private static final Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaLegacy")); + private final static Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaLegacy")); public ViaLegacyPlatformImpl() { this.init(this.getDataFolder()); 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 dd427e0d..4f186fcb 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 @@ -33,9 +33,9 @@ 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, UUID.randomUUID().toString()); - public static final MinecraftSessionService SESSION_SERVICE = AUTHENTICATION_SERVICE.createMinecraftSessionService(); - public static final GameProfileRepository GAME_PROFILE_REPOSITORY = AUTHENTICATION_SERVICE.createProfileRepository(); + public final static HttpAuthenticationService AUTHENTICATION_SERVICE = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); + public final static MinecraftSessionService SESSION_SERVICE = AUTHENTICATION_SERVICE.createMinecraftSessionService(); + public final static GameProfileRepository GAME_PROFILE_REPOSITORY = AUTHENTICATION_SERVICE.createProfileRepository(); @Override public UUID loadMojangUUID(String playerName) throws Exception {