some code style changes

This commit is contained in:
FlorianMichael 2023-04-24 22:34:25 +02:00
parent 9104b4d78c
commit 65fe211fae
20 changed files with 40 additions and 40 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */
);

View File

@ -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;

View File

@ -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) {

View File

@ -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<VoxelShape> ci) {

View File

@ -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<VoxelShape> cir) {

View File

@ -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),

View File

@ -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),

View File

@ -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

View File

@ -37,7 +37,7 @@ import java.util.Set;
public abstract class MixinHoeItem extends MiningToolItem {
@Unique
private static final Set<Block> viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of(
private final static Set<Block> viafabricplus_EFFECTIVE_BLOCKS_1165 = ImmutableSet.of(
Blocks.NETHER_WART_BLOCK,
Blocks.WARPED_WART_BLOCK,
Blocks.HAY_BLOCK,

View File

@ -38,13 +38,13 @@ import java.util.Set;
public abstract class MixinPickaxeItem extends MiningToolItem {
@Unique
private static final Set<Block> 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<Block> 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<Material> viafabricplus_EFFECTIVE_MATERIALS = ImmutableSet.of(Material.METAL, Material.REPAIR_STATION, Material.STONE);
private final static Set<Material> viafabricplus_EFFECTIVE_MATERIALS = ImmutableSet.of(Material.METAL, Material.REPAIR_STATION, Material.STONE);
@Unique
private static final Set<Block> 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<Block> 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<Block> effectiveBlocks, Settings settings) {
super(attackDamage, attackSpeed, material, effectiveBlocks, settings);

View File

@ -55,16 +55,16 @@ import java.util.UUID;
public class MixinProtocol1_19_3To1_19_1 extends AbstractProtocol<ClientboundPackets1_19_1, ClientboundPackets1_19_3, ServerboundPackets1_19_1, ServerboundPackets1_19_3> {
@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) {

View File

@ -30,7 +30,7 @@ import java.util.List;
import java.util.Map;
public class ArmorPointsMappings {
public static final List<Item> ARMOR_ITEMS_IN_1_8 = Arrays.asList(
public final static List<Item> ARMOR_ITEMS_IN_1_8 = Arrays.asList(
Items.LEATHER_HELMET,
Items.LEATHER_CHESTPLATE,
Items.LEATHER_BOOTS,

View File

@ -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

View File

@ -28,7 +28,7 @@ import java.util.List;
public class RakMessageEncapsulationCodec extends MessageToMessageCodec<RakMessage, ByteBuf> {
private static final int FRAME_ID = 0xFE;
private final static int FRAME_ID = 0xFE;
@Override
protected void encode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) {

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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 {