├── .editorconfig ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── dependabot.yml └── workflows │ └── build.yml ├── .gitignore ├── .idea └── copyright │ ├── GPL_3_0.xml │ └── profiles_settings.xml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build.gradle.kts ├── docs ├── DEVELOPER_API.md ├── MAINTAINING.md ├── USAGE.md └── preview │ ├── bedrock_realms.png │ ├── betacraft_servers.png │ ├── classicube_login.png │ ├── classicube_servers.png │ ├── debug_hud.png │ ├── multiplayer.png │ ├── protocol_selection.png │ ├── set_version_for_server.png │ └── settings_selection.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts ├── src ├── main │ ├── java │ │ └── com │ │ │ └── viaversion │ │ │ └── viafabricplus │ │ │ ├── ViaFabricPlusImpl.java │ │ │ ├── base │ │ │ ├── Events.java │ │ │ ├── ModMenuScreenFactory.java │ │ │ └── sync_tasks │ │ │ │ ├── DataCustomPayload.java │ │ │ │ └── SyncTasks.java │ │ │ ├── features │ │ │ ├── FeaturesLoading.java │ │ │ ├── block │ │ │ │ └── shape │ │ │ │ │ └── CollisionShapes.java │ │ │ ├── classic │ │ │ │ ├── cpe_extension │ │ │ │ │ └── CPEAdditions.java │ │ │ │ └── world_height │ │ │ │ │ └── WorldHeightSupport.java │ │ │ ├── entity │ │ │ │ ├── EntityDimensionDiff.java │ │ │ │ ├── attribute │ │ │ │ │ └── EnchantmentAttributesEmulation1_20_6.java │ │ │ │ ├── metadata_handling │ │ │ │ │ └── WolfHealthTracker1_14_4.java │ │ │ │ ├── r1_8_boat │ │ │ │ │ ├── BoatModel1_8.java │ │ │ │ │ ├── BoatRenderer1_8.java │ │ │ │ │ └── PositionInterpolator1_8.java │ │ │ │ └── riding_offset │ │ │ │ │ └── EntityRidingOffsetsPre1_20_2.java │ │ │ ├── font │ │ │ │ ├── BuiltinEmptyGlyph1_12_2.java │ │ │ │ ├── FontCacheReload.java │ │ │ │ └── RenderableGlyphDiff.java │ │ │ ├── footstep_particle │ │ │ │ └── FootStepParticle1_12_2.java │ │ │ ├── interaction │ │ │ │ ├── r1_18_2_block_ack_emulation │ │ │ │ │ └── ClientPlayerInteractionManager1_18_2.java │ │ │ │ └── replace_block_placement_logic │ │ │ │ │ └── ActionResultException1_12_2.java │ │ │ ├── item │ │ │ │ ├── filter_creative_tabs │ │ │ │ │ └── ItemRegistryDiff.java │ │ │ │ ├── negative_item_count │ │ │ │ │ └── NegativeItemUtil.java │ │ │ │ └── r1_14_4_enchantment_tooltip │ │ │ │ │ └── Enchantments1_14_4.java │ │ │ ├── limitation │ │ │ │ └── max_chat_length │ │ │ │ │ └── MaxChatLength.java │ │ │ ├── mouse_sensitivity │ │ │ │ └── MouseSensitivity1_13_2.java │ │ │ ├── movement │ │ │ │ └── elytra │ │ │ │ │ └── FabricAPIWorkaround.java │ │ │ ├── networking │ │ │ │ ├── armor_hud │ │ │ │ │ └── ArmorHudEmulation1_8.java │ │ │ │ ├── legacy_chat_signature │ │ │ │ │ └── KeyPairResponse1_19_0.java │ │ │ │ └── resource_pack_header │ │ │ │ │ └── ResourcePackHeaderDiff.java │ │ │ ├── recipe │ │ │ │ ├── AddBannerPatternRecipe.java │ │ │ │ ├── BannerPattern_1_13_2.java │ │ │ │ ├── RecipeInfo.java │ │ │ │ ├── RecipeManager1_11_2.java │ │ │ │ ├── Recipes1_11_2.java │ │ │ │ └── ShulkerBoxColoringRecipe.java │ │ │ └── world │ │ │ │ ├── disable_sequencing │ │ │ │ └── PendingUpdateManager1_18_2.java │ │ │ │ └── item_picking │ │ │ │ └── ItemPick1_21_3.java │ │ │ ├── injection │ │ │ ├── ViaFabricPlusMixinPlugin.java │ │ │ ├── access │ │ │ │ ├── base │ │ │ │ │ ├── IClientConnection.java │ │ │ │ │ ├── IExtensionProtocolMetadataStorage.java │ │ │ │ │ ├── IMultiValueDebugSampleLogImpl.java │ │ │ │ │ ├── IServerInfo.java │ │ │ │ │ ├── ITextFieldWidget.java │ │ │ │ │ └── bedrock │ │ │ │ │ │ ├── IChunkTracker.java │ │ │ │ │ │ ├── IConfirmScreen.java │ │ │ │ │ │ └── IRakSessionCodec.java │ │ │ │ ├── block │ │ │ │ │ └── shape │ │ │ │ │ │ └── IHorizontalConnectingBlock.java │ │ │ │ ├── entity │ │ │ │ │ └── r1_8_boat │ │ │ │ │ │ └── IAbstractBoatEntity.java │ │ │ │ ├── execute_inputs_sync │ │ │ │ │ └── IMouseKeyboard.java │ │ │ │ ├── interaction │ │ │ │ │ ├── container_clicking │ │ │ │ │ │ └── IScreenHandler.java │ │ │ │ │ └── r1_18_2_block_ack_emulation │ │ │ │ │ │ └── IClientPlayerInteractionManager.java │ │ │ │ ├── networking │ │ │ │ │ ├── downloading_terrain │ │ │ │ │ │ └── IDownloadingTerrainScreen.java │ │ │ │ │ └── legacy_chat_signature │ │ │ │ │ │ └── ILegacyKeySignatureStorage.java │ │ │ │ └── world │ │ │ │ │ └── always_tick_entities │ │ │ │ │ └── IEntity.java │ │ │ └── mixin │ │ │ │ ├── base │ │ │ │ ├── MixinMain.java │ │ │ │ ├── access │ │ │ │ │ ├── MixinChunkTracker.java │ │ │ │ │ ├── MixinMultiValueDebugSampleLogImpl.java │ │ │ │ │ └── MixinRakSessionCodec.java │ │ │ │ ├── connection │ │ │ │ │ ├── MixinClientConnection.java │ │ │ │ │ ├── MixinClientConnection_1.java │ │ │ │ │ ├── MixinClientLoginNetworkHandler.java │ │ │ │ │ ├── MixinConnectScreen_1.java │ │ │ │ │ ├── MixinGameOptions.java │ │ │ │ │ ├── MixinMinecraftClient.java │ │ │ │ │ └── MixinMultiplayerServerListPinger.java │ │ │ │ ├── integration │ │ │ │ │ ├── MixinClientConnection.java │ │ │ │ │ ├── MixinDebugHud.java │ │ │ │ │ ├── MixinMultiplayerServerListPinger_1.java │ │ │ │ │ ├── MixinServerInfo.java │ │ │ │ │ ├── MixinUserConnectionImpl.java │ │ │ │ │ ├── MixinViaLegacyConfig.java │ │ │ │ │ ├── bedrock │ │ │ │ │ │ ├── MixinConfirmScreen.java │ │ │ │ │ │ ├── MixinConnectScreen_1.java │ │ │ │ │ │ ├── MixinJoinPackets.java │ │ │ │ │ │ └── MixinMultiplayerServerListPinger.java │ │ │ │ │ ├── event │ │ │ │ │ │ └── MixinMinecraftClient.java │ │ │ │ │ └── sync_tasks │ │ │ │ │ │ └── MixinClientCommonNetworkHandler.java │ │ │ │ └── ui │ │ │ │ │ ├── MixinAddServerScreen.java │ │ │ │ │ ├── MixinConnectScreen_1.java │ │ │ │ │ ├── MixinDirectConnectScreen.java │ │ │ │ │ ├── MixinDownloadingTerrainScreen.java │ │ │ │ │ ├── MixinMultiplayerScreen.java │ │ │ │ │ └── MixinMultiplayerServerListWidget_ServerEntry.java │ │ │ │ ├── compat │ │ │ │ ├── classic4j │ │ │ │ │ ├── MixinCCAuthenticationResponse.java │ │ │ │ │ └── MixinTextFieldWidget.java │ │ │ │ ├── fabricapi │ │ │ │ │ └── MixinClientRegistrySyncHandler.java │ │ │ │ ├── ipnext │ │ │ │ │ └── MixinAutoRefillHandler_ItemSlotMonitor.java │ │ │ │ ├── lithium │ │ │ │ │ └── MixinEntity.java │ │ │ │ ├── mcstructs │ │ │ │ │ └── MixinTextComponentSerializer.java │ │ │ │ └── minecraftauth │ │ │ │ │ ├── MixinClasses.java │ │ │ │ │ └── MixinDefaultJwtParserBuilder.java │ │ │ │ ├── features │ │ │ │ ├── april_fools_8bit_sound │ │ │ │ │ └── MixinStaticSound.java │ │ │ │ ├── bedrock │ │ │ │ │ ├── allow_new_line │ │ │ │ │ │ └── MixinTextRenderer.java │ │ │ │ │ ├── reach_around_raycast │ │ │ │ │ │ └── MixinGameRenderer.java │ │ │ │ │ └── remove_dummy_player_suggestions │ │ │ │ │ │ └── MixinClientCommandSource.java │ │ │ │ ├── block │ │ │ │ │ ├── interaction │ │ │ │ │ │ ├── MixinAbstractSignBlock.java │ │ │ │ │ │ ├── MixinDecoratedPotBlock.java │ │ │ │ │ │ ├── MixinFenceBlock.java │ │ │ │ │ │ ├── MixinFlowerPotBlock.java │ │ │ │ │ │ ├── MixinNoteBlock.java │ │ │ │ │ │ └── MixinPaneBlock.java │ │ │ │ │ ├── mining_calculation │ │ │ │ │ │ ├── MixinAbstractBlock.java │ │ │ │ │ │ ├── MixinAbstractBlock_AbstractBlockState.java │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ └── shape │ │ │ │ │ │ ├── MixinAbstractRailBlock.java │ │ │ │ │ │ ├── MixinAnvilBlock.java │ │ │ │ │ │ ├── MixinBedBlock.java │ │ │ │ │ │ ├── MixinBrewingStandBlock.java │ │ │ │ │ │ ├── MixinCarpetBlock.java │ │ │ │ │ │ ├── MixinCauldronBlock.java │ │ │ │ │ │ ├── MixinChestBlock.java │ │ │ │ │ │ ├── MixinCropBlocks.java │ │ │ │ │ │ ├── MixinEndPortalBlock.java │ │ │ │ │ │ ├── MixinEndPortalFrameBlock.java │ │ │ │ │ │ ├── MixinEnderChestBlock.java │ │ │ │ │ │ ├── MixinFarmlandBlock.java │ │ │ │ │ │ ├── MixinFenceBlock.java │ │ │ │ │ │ ├── MixinFenceGateBlock.java │ │ │ │ │ │ ├── MixinFireBlock.java │ │ │ │ │ │ ├── MixinFlowerbedBlock.java │ │ │ │ │ │ ├── MixinHopperBlock.java │ │ │ │ │ │ ├── MixinHorizontalConnectingBlock.java │ │ │ │ │ │ ├── MixinLadderBlock.java │ │ │ │ │ │ ├── MixinLeavesBlock.java │ │ │ │ │ │ ├── MixinLilyPadBlock.java │ │ │ │ │ │ ├── MixinPaneBlock.java │ │ │ │ │ │ ├── MixinPistonBlock.java │ │ │ │ │ │ ├── MixinPistonHeadBlock.java │ │ │ │ │ │ ├── MixinPitcherCropBlock.java │ │ │ │ │ │ ├── MixinSnowBlock.java │ │ │ │ │ │ ├── MixinSoulSandBlock.java │ │ │ │ │ │ └── MixinWallBlock.java │ │ │ │ ├── classic │ │ │ │ │ ├── cpe_extension │ │ │ │ │ │ ├── MixinClassicProtocolExtension.java │ │ │ │ │ │ ├── MixinClientboundPacketsc0_30cpe.java │ │ │ │ │ │ ├── MixinProtocolc0_30cpeToc0_28_30.java │ │ │ │ │ │ └── MixinWeatherRendering.java │ │ │ │ │ └── world_height │ │ │ │ │ │ ├── MixinEntityPacketRewriter1_17.java │ │ │ │ │ │ ├── MixinWorldPacketRewriter1_16_2.java │ │ │ │ │ │ └── MixinWorldPacketRewriter1_17.java │ │ │ │ ├── entity │ │ │ │ │ ├── allow_duplicated_uuid │ │ │ │ │ │ └── MixinEntityIndex.java │ │ │ │ │ ├── attribute │ │ │ │ │ │ ├── MixinEntityPacketRewriter1_20_5.java │ │ │ │ │ │ └── MixinLivingEntity.java │ │ │ │ │ ├── interaction │ │ │ │ │ │ ├── MixinAbstractBoatEntity.java │ │ │ │ │ │ ├── MixinAbstractCowEntity.java │ │ │ │ │ │ ├── MixinAbstractHorseEntity.java │ │ │ │ │ │ ├── MixinAnimalEntity.java │ │ │ │ │ │ ├── MixinArmadilloEntity.java │ │ │ │ │ │ ├── MixinAxolotlEntity.java │ │ │ │ │ │ ├── MixinBeeEntity.java │ │ │ │ │ │ ├── MixinCatEntity.java │ │ │ │ │ │ ├── MixinCreeperEntity.java │ │ │ │ │ │ ├── MixinMobEntity.java │ │ │ │ │ │ ├── MixinMooshroomEntity.java │ │ │ │ │ │ ├── MixinSquidEntity.java │ │ │ │ │ │ ├── MixinWolfEntity.java │ │ │ │ │ │ └── MixinZombieVillagerEntity.java │ │ │ │ │ ├── metadata_handling │ │ │ │ │ │ ├── MixinCommonBoss.java │ │ │ │ │ │ ├── MixinEntityPacketRewriter1_15.java │ │ │ │ │ │ ├── MixinEntityPacketRewriter1_9.java │ │ │ │ │ │ ├── MixinEntityTracker1_9.java │ │ │ │ │ │ └── MixinWolfEntity.java │ │ │ │ │ ├── pose │ │ │ │ │ │ ├── MixinOtherClientPlayerEntity.java │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── r1_8_boat │ │ │ │ │ │ ├── MixinAbstractBoatEntity.java │ │ │ │ │ │ ├── MixinEntityModels.java │ │ │ │ │ │ └── MixinEntityRenderDispatcher.java │ │ │ │ │ └── riding_offset │ │ │ │ │ │ ├── MixinAbstractBoatEntity.java │ │ │ │ │ │ ├── MixinCamelEntity.java │ │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ │ └── MixinLivingEntity.java │ │ │ │ ├── execute_inputs_sync │ │ │ │ │ ├── MixinKeyboard.java │ │ │ │ │ ├── MixinMinecraftClient.java │ │ │ │ │ └── MixinMouse.java │ │ │ │ ├── font │ │ │ │ │ └── MixinFontStorage.java │ │ │ │ ├── footstep_particle │ │ │ │ │ ├── MixinMappingDataBase.java │ │ │ │ │ ├── MixinParticleIdMappings1_13.java │ │ │ │ │ ├── MixinParticleMappings.java │ │ │ │ │ └── MixinRegistrySyncManager.java │ │ │ │ ├── interaction │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ ├── MixinPlayerEntity.java │ │ │ │ │ ├── container_clicking │ │ │ │ │ │ ├── MixinAbstractFurnaceScreenHandler.java │ │ │ │ │ │ ├── MixinBlockItemPacketRewriter1_21_5.java │ │ │ │ │ │ ├── MixinClientPlayerInteractionManager.java │ │ │ │ │ │ ├── MixinCraftingScreenHandler.java │ │ │ │ │ │ ├── MixinItemPacketRewriter1_17.java │ │ │ │ │ │ ├── MixinMerchantScreenHandler.java │ │ │ │ │ │ ├── MixinScreenHandler.java │ │ │ │ │ │ └── MixinStructuredItemRewriter.java │ │ │ │ │ ├── cooldown │ │ │ │ │ │ ├── MixinItemCooldownManager.java │ │ │ │ │ │ ├── MixinMinecraftClient.java │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── r1_18_2_block_ack_emulation │ │ │ │ │ │ ├── MixinClientPlayerInteractionManager.java │ │ │ │ │ │ └── MixinWorldPacketRewriter1_19.java │ │ │ │ │ ├── remove_fuel_slot │ │ │ │ │ │ └── MixinBrewingStandScreenHandler_FuelSlot.java │ │ │ │ │ ├── remove_offhand_slot │ │ │ │ │ │ └── MixinPlayerScreenHandler.java │ │ │ │ │ └── replace_block_item_use_logic │ │ │ │ │ │ ├── MixinClientPlayerInteractionManager.java │ │ │ │ │ │ ├── MixinItemPlacementContext.java │ │ │ │ │ │ └── MixinMinecraftClient.java │ │ │ │ ├── item │ │ │ │ │ ├── attack_damage │ │ │ │ │ │ ├── MixinItemPacketRewriter1_9.java │ │ │ │ │ │ └── MixinItemStack.java │ │ │ │ │ ├── data_fix │ │ │ │ │ │ └── MixinBlockItemPacketRewriter1_20_5.java │ │ │ │ │ ├── filter_creative_tabs │ │ │ │ │ │ ├── MixinItemGroup_EntriesImpl.java │ │ │ │ │ │ └── MixinItemGroups.java │ │ │ │ │ ├── interaction │ │ │ │ │ │ ├── MixinAxeItem.java │ │ │ │ │ │ ├── MixinBlockItem.java │ │ │ │ │ │ ├── MixinBowItem.java │ │ │ │ │ │ ├── MixinBrushItem.java │ │ │ │ │ │ ├── MixinBucketItem.java │ │ │ │ │ │ ├── MixinBundleItem.java │ │ │ │ │ │ ├── MixinEnderPearlItem.java │ │ │ │ │ │ ├── MixinEquippableComponent.java │ │ │ │ │ │ ├── MixinFireChargeItem.java │ │ │ │ │ │ ├── MixinFishingRodItem.java │ │ │ │ │ │ ├── MixinKnowledgeBookItem.java │ │ │ │ │ │ ├── MixinLeadItem.java │ │ │ │ │ │ ├── MixinNameTagItem.java │ │ │ │ │ │ └── MixinShovelItem.java │ │ │ │ │ ├── negative_item_count │ │ │ │ │ │ └── MixinDrawContext.java │ │ │ │ │ ├── sword_blocking │ │ │ │ │ │ └── MixinBlockItemPacketRewriter1_21_X.java │ │ │ │ │ └── tooltip │ │ │ │ │ │ ├── MixinComponentRewriter1_21_5.java │ │ │ │ │ │ └── MixinItemStack.java │ │ │ │ ├── large_container │ │ │ │ │ └── MixinItemPacketRewriter1_14.java │ │ │ │ ├── legacy_tab_completion │ │ │ │ │ ├── MixinAbstractCommandBlockScreen.java │ │ │ │ │ ├── MixinChatInputSuggestor.java │ │ │ │ │ └── MixinChatScreen.java │ │ │ │ ├── limitation │ │ │ │ │ ├── allow_negative_amplifier │ │ │ │ │ │ └── MixinStatusEffectInstance.java │ │ │ │ │ ├── book_edit │ │ │ │ │ │ └── MixinBookEditScreen.java │ │ │ │ │ └── max_chat_length │ │ │ │ │ │ ├── MixinChatMessageC2SPacket.java │ │ │ │ │ │ ├── MixinChatScreen.java │ │ │ │ │ │ ├── MixinProtocol1_10To1_11.java │ │ │ │ │ │ └── MixinStringHelper.java │ │ │ │ ├── mouse_sensitivity │ │ │ │ │ ├── MixinMouse.java │ │ │ │ │ └── MixinMouseOptionsScreen.java │ │ │ │ ├── movement │ │ │ │ │ ├── collision │ │ │ │ │ │ ├── MixinAbstractBoatEntity.java │ │ │ │ │ │ ├── MixinBedBlock.java │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ │ ├── MixinHoneyBlock.java │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ └── MixinSoulSandBlock.java │ │ │ │ │ ├── constants │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ ├── MixinPlayerEntity.java │ │ │ │ │ │ └── MixinPlayerEntityRenderer.java │ │ │ │ │ ├── elytra │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ ├── MixinFireworkRocketItem.java │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── jump │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ └── MixinLivingEntity.java │ │ │ │ │ ├── limitation │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ ├── MixinPlayerEntity.java │ │ │ │ │ │ └── rotation │ │ │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── packet │ │ │ │ │ │ └── MixinClientPlayerEntity.java │ │ │ │ │ ├── slowdown │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ └── MixinEnderEyeItem.java │ │ │ │ │ ├── sprinting_and_sneaking │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ ├── MixinKeyboardInput.java │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── vehicle │ │ │ │ │ │ └── MixinClientPlayerEntity.java │ │ │ │ │ └── water │ │ │ │ │ │ ├── MixinClientPlayerEntity.java │ │ │ │ │ │ ├── MixinEntity.java │ │ │ │ │ │ ├── MixinFlowableFluid.java │ │ │ │ │ │ ├── MixinItemEntity.java │ │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ │ └── MixinSkeletonHorseEntity.java │ │ │ │ ├── networking │ │ │ │ │ ├── config_state │ │ │ │ │ │ ├── MixinClientConfigurationNetworkHandler.java │ │ │ │ │ │ ├── MixinClientPlayNetworkHandler.java │ │ │ │ │ │ ├── MixinConfigurationState.java │ │ │ │ │ │ ├── MixinNetworkStateTransitionHandler.java │ │ │ │ │ │ ├── MixinNetworkStateTransitions.java │ │ │ │ │ │ └── MixinProtocol1_20To1_20_2.java │ │ │ │ │ ├── disable_server_pinging │ │ │ │ │ │ └── MixinMultiplayerServerListWidget_ServerEntry.java │ │ │ │ │ ├── downloading_terrain │ │ │ │ │ │ ├── MixinClientPlayNetworkHandler.java │ │ │ │ │ │ ├── MixinDownloadingTerrainScreen.java │ │ │ │ │ │ └── MixinEntityPacketRewriter1_20_3.java │ │ │ │ │ ├── keep_player_loaded │ │ │ │ │ │ └── MixinPlayerEntity.java │ │ │ │ │ ├── legacy_chat_signature │ │ │ │ │ │ ├── MixinConnectScreen_1.java │ │ │ │ │ │ ├── MixinKeyPairResponse.java │ │ │ │ │ │ ├── MixinPlayerPublicKey_PublicKeyData.java │ │ │ │ │ │ ├── MixinProfileKeysImpl.java │ │ │ │ │ │ └── MixinYggdrasilUserApiService.java │ │ │ │ │ ├── limitation │ │ │ │ │ │ ├── MixinClientLoginNetworkHandler.java │ │ │ │ │ │ └── nbt │ │ │ │ │ │ │ ├── MixinNamedCompoundTagType.java │ │ │ │ │ │ │ └── MixinTagType.java │ │ │ │ │ ├── open_inventory_packet │ │ │ │ │ │ └── MixinMinecraftClient.java │ │ │ │ │ ├── packet_handling │ │ │ │ │ │ ├── MixinClientCommonNetworkHandler.java │ │ │ │ │ │ ├── MixinClientPlayNetworkHandler.java │ │ │ │ │ │ └── MixinEntityPacketRewriter1_19_4.java │ │ │ │ │ ├── player_abilities │ │ │ │ │ │ └── MixinUpdatePlayerAbilitiesC2SPacket.java │ │ │ │ │ ├── registry_validation │ │ │ │ │ │ ├── MixinRegistryEntryListCodec.java │ │ │ │ │ │ └── MixinRegistryEntryList_Named.java │ │ │ │ │ ├── remove_legacy_pinger │ │ │ │ │ │ └── MixinMultiplayerServerListPinger.java │ │ │ │ │ ├── remove_signed_commands │ │ │ │ │ │ ├── MixinClientPlayNetworkHandler.java │ │ │ │ │ │ └── MixinProtocol1_20_3To1_20_5.java │ │ │ │ │ ├── resource_pack_header │ │ │ │ │ │ └── MixinServerResourcePackLoader_4.java │ │ │ │ │ └── srv_resolving │ │ │ │ │ │ ├── MixinAllowedAddressResolver.java │ │ │ │ │ │ ├── MixinConnectScreen_1.java │ │ │ │ │ │ ├── MixinRedirectResolver.java │ │ │ │ │ │ └── MixinServerAddress.java │ │ │ │ ├── recipe │ │ │ │ │ ├── MixinCraftingScreenHandler.java │ │ │ │ │ ├── MixinEntityPacketRewriter1_12.java │ │ │ │ │ └── MixinPlayerScreenHandler.java │ │ │ │ ├── remove_newer_screen_features │ │ │ │ │ ├── MixinCommandBlockScreen.java │ │ │ │ │ ├── MixinJigsawBlockScreen.java │ │ │ │ │ ├── MixinStructureBlockScreen.java │ │ │ │ │ └── MixinStructureBlockScreen_1.java │ │ │ │ ├── run_command_action │ │ │ │ │ └── MixinScreen.java │ │ │ │ ├── sign_editor_reach │ │ │ │ │ └── MixinAbstractSignEditScreen.java │ │ │ │ ├── skin_loading │ │ │ │ │ └── MixinPlayerListEntry.java │ │ │ │ ├── swinging │ │ │ │ │ ├── MixinInventoryTracker1_16.java │ │ │ │ │ ├── MixinLivingEntity.java │ │ │ │ │ └── MixinMinecraftClient.java │ │ │ │ └── world │ │ │ │ │ ├── always_tick_entities │ │ │ │ │ ├── MixinClientWorld.java │ │ │ │ │ └── MixinEntity.java │ │ │ │ │ ├── border_chunk_rendering │ │ │ │ │ └── MixinBuiltChunk.java │ │ │ │ │ ├── disable_sequencing │ │ │ │ │ └── MixinClientWorld.java │ │ │ │ │ ├── item_picking │ │ │ │ │ └── MixinMinecraftClient.java │ │ │ │ │ └── remove_server_view_distance │ │ │ │ │ └── MixinGameOptions.java │ │ │ │ └── unapplied │ │ │ │ └── MixinMilkBucketItem.java │ │ │ ├── protocoltranslator │ │ │ ├── ProtocolTranslator.java │ │ │ ├── impl │ │ │ │ ├── ViaFabricPlusMappingDataLoader.java │ │ │ │ ├── command │ │ │ │ │ ├── VFPViaSubCommand.java │ │ │ │ │ ├── ViaFabricPlusVLCommandHandler.java │ │ │ │ │ ├── ViaFabricPlusViaCommandSender.java │ │ │ │ │ └── classic │ │ │ │ │ │ ├── ListExtensionsCommand.java │ │ │ │ │ │ └── SetTimeCommand.java │ │ │ │ ├── platform │ │ │ │ │ ├── ViaFabricPlusViaLegacyPlatformImpl.java │ │ │ │ │ └── ViaFabricPlusViaVersionPlatformImpl.java │ │ │ │ ├── provider │ │ │ │ │ ├── viabedrock │ │ │ │ │ │ └── ViaFabricPlusNettyPipelineProvider.java │ │ │ │ │ ├── vialegacy │ │ │ │ │ │ ├── ViaFabricPlusAlphaInventoryProvider.java │ │ │ │ │ │ ├── ViaFabricPlusClassicMPPassProvider.java │ │ │ │ │ │ ├── ViaFabricPlusClassicWorldHeightProvider.java │ │ │ │ │ │ ├── ViaFabricPlusEncryptionProvider.java │ │ │ │ │ │ ├── ViaFabricPlusGameProfileFetcher.java │ │ │ │ │ │ └── ViaFabricPlusOldAuthProvider.java │ │ │ │ │ └── viaversion │ │ │ │ │ │ ├── ViaFabricPlusAckSequenceProvider.java │ │ │ │ │ │ ├── ViaFabricPlusBaseVersionProvider.java │ │ │ │ │ │ ├── ViaFabricPlusCommandArgumentsProvider.java │ │ │ │ │ │ ├── ViaFabricPlusHandItemProvider.java │ │ │ │ │ │ ├── ViaFabricPlusPickItemProvider.java │ │ │ │ │ │ ├── ViaFabricPlusPlayerAbilitiesProvider.java │ │ │ │ │ │ └── ViaFabricPlusPlayerLookTargetProvider.java │ │ │ │ └── viaversion │ │ │ │ │ ├── ViaFabricPlusVLInjector.java │ │ │ │ │ ├── ViaFabricPlusVLLoader.java │ │ │ │ │ └── ViaFabricPlusVLViaConfig.java │ │ │ ├── netty │ │ │ │ ├── NoReadFlowControlHandler.java │ │ │ │ ├── ViaFabricPlusVLLegacyPipeline.java │ │ │ │ └── ViaFabricPlusViaDecoder.java │ │ │ ├── protocol │ │ │ │ ├── ViaFabricPlusProtocol.java │ │ │ │ └── storage │ │ │ │ │ └── BedrockJoinGameTracker.java │ │ │ ├── translator │ │ │ │ ├── BlockStateTranslator.java │ │ │ │ ├── ItemTranslator.java │ │ │ │ └── TextComponentTranslator.java │ │ │ └── util │ │ │ │ ├── NoPacketSendChannel.java │ │ │ │ └── ProtocolVersionDetector.java │ │ │ ├── save │ │ │ ├── AbstractSave.java │ │ │ ├── SaveManager.java │ │ │ └── impl │ │ │ │ ├── AccountsSave.java │ │ │ │ └── SettingsSave.java │ │ │ ├── screen │ │ │ ├── VFPList.java │ │ │ ├── VFPListEntry.java │ │ │ ├── VFPScreen.java │ │ │ └── impl │ │ │ │ ├── PerServerVersionScreen.java │ │ │ │ ├── ProtocolSelectionScreen.java │ │ │ │ ├── ReportIssuesScreen.java │ │ │ │ ├── ServerListScreen.java │ │ │ │ ├── SettingsScreen.java │ │ │ │ ├── classic4j │ │ │ │ ├── BetaCraftScreen.java │ │ │ │ ├── ClassiCubeLoginScreen.java │ │ │ │ ├── ClassiCubeMFAScreen.java │ │ │ │ └── ClassiCubeServerListScreen.java │ │ │ │ ├── realms │ │ │ │ ├── AcceptInvitationCodeScreen.java │ │ │ │ └── BedrockRealmsScreen.java │ │ │ │ └── settings │ │ │ │ ├── BooleanListEntry.java │ │ │ │ ├── ButtonListEntry.java │ │ │ │ ├── ModeListEntry.java │ │ │ │ ├── TitleEntry.java │ │ │ │ └── VersionedBooleanListEntry.java │ │ │ ├── settings │ │ │ ├── SettingsManager.java │ │ │ └── impl │ │ │ │ ├── AuthenticationSettings.java │ │ │ │ ├── BedrockSettings.java │ │ │ │ ├── DebugSettings.java │ │ │ │ └── GeneralSettings.java │ │ │ └── util │ │ │ ├── ClassLoaderPriorityUtil.java │ │ │ ├── ConnectionUtil.java │ │ │ ├── ItemUtil.java │ │ │ ├── MapUtil.java │ │ │ └── NotificationUtil.java │ └── resources │ │ ├── assets │ │ └── viafabricplus │ │ │ ├── data │ │ │ ├── armor-damages-b1.8.1.json │ │ │ ├── item-attributes-1.8.json │ │ │ ├── item-identifiers-1.8.json │ │ │ ├── item-tool-components.json │ │ │ └── materials-1.19.4.json │ │ │ ├── icon.png │ │ │ ├── lang │ │ │ ├── cs_cz.json │ │ │ ├── de_de.json │ │ │ ├── en_us.json │ │ │ ├── es_ar.json │ │ │ ├── es_cl.json │ │ │ ├── es_ec.json │ │ │ ├── es_es.json │ │ │ ├── es_mx.json │ │ │ ├── es_uy.json │ │ │ ├── es_ve.json │ │ │ ├── fi_fi.json │ │ │ ├── fr_fr.json │ │ │ ├── hu_hu.json │ │ │ ├── it_it.json │ │ │ ├── ja_jp.json │ │ │ ├── ko_kr.json │ │ │ ├── lb_lu.json │ │ │ ├── lzh.json │ │ │ ├── pl_pl.json │ │ │ ├── pt_br.json │ │ │ ├── ru_ru.json │ │ │ ├── th_th.json │ │ │ ├── tr_tr.json │ │ │ ├── uk_ua.json │ │ │ ├── zh_cn.json │ │ │ ├── zh_hk.json │ │ │ └── zh_tw.json │ │ │ ├── particles │ │ │ └── footstep.json │ │ │ └── textures │ │ │ ├── boat1_8.png │ │ │ └── particle │ │ │ └── footprint.png │ │ ├── fabric.mod.json │ │ ├── viafabricplus.accesswidener │ │ └── viafabricplus.mixins.json └── test │ └── java │ └── com │ └── viaversion │ └── viafabricplus │ └── generator │ ├── ViaFabricPlusGenerator.java │ ├── blocks │ └── GenerateCollisionShapes.java │ ├── impl │ ├── EntityDimensionDiffGenerator.java │ ├── ItemRegistryDiffGenerator.java │ └── ResourcePackHeaderDiffGenerator.java │ └── util │ ├── FieldUtil.java │ └── Generator.java ├── viafabricplus-api ├── gradle.properties └── src │ └── main │ ├── java │ └── com │ │ └── viaversion │ │ └── viafabricplus │ │ ├── ViaFabricPlus.java │ │ ├── api │ │ ├── ViaFabricPlusBase.java │ │ ├── entrypoint │ │ │ └── ViaFabricPlusLoadEntrypoint.java │ │ ├── events │ │ │ ├── ChangeProtocolVersionCallback.java │ │ │ └── LoadingCycleCallback.java │ │ └── settings │ │ │ ├── AbstractSetting.java │ │ │ ├── SettingGroup.java │ │ │ └── type │ │ │ ├── BooleanSetting.java │ │ │ ├── ButtonSetting.java │ │ │ ├── ModeSetting.java │ │ │ └── VersionedBooleanSetting.java │ │ └── util │ │ └── ChatUtil.java │ └── resources │ └── fabric.mod.json └── viafabricplus-visuals ├── build.gradle.kts ├── gradle.properties └── src └── main ├── java └── com │ └── viaversion │ └── viafabricplus │ └── visuals │ ├── ViaFabricPlusVisuals.java │ ├── features │ ├── classic │ │ └── creative_menu │ │ │ └── GridItemSelectionScreen.java │ ├── force_unicode_font │ │ ├── LanguageUtil.java │ │ └── UnicodeFontFix1_12_2.java │ └── r1_7_tab_list_style │ │ └── LegacyTabList.java │ ├── injection │ ├── access │ │ └── r1_7_tab_list_tyle │ │ │ ├── IPlayerListEntry.java │ │ │ └── IPlayerListHud.java │ └── mixin │ │ ├── classic │ │ ├── creative_menu │ │ │ └── MixinCreativeInventoryScreen.java │ │ └── walking_animation │ │ │ └── MixinBipedEntityModel.java │ │ ├── downloading_terrain_transitions │ │ └── MixinDownloadingTerrainScreen.java │ │ ├── filter_game_mode_selections │ │ ├── MixinGameModeSwitcherScreen.java │ │ └── MixinGameModeSwitcherScreen_GameModeSelection.java │ │ ├── force_unicode_font │ │ └── MixinLanguageManager.java │ │ ├── hud_element_changes │ │ ├── MixinChatHud.java │ │ ├── MixinChatScreen.java │ │ ├── MixinClientPlayerInteractionManager.java │ │ └── MixinInGameHud.java │ │ ├── instant_sneaking │ │ └── MixinCamera.java │ │ ├── oof_sound │ │ └── MixinPlayerEntity.java │ │ ├── petrified_oak_slab_model │ │ └── MixinItemRenderer.java │ │ ├── player_rotations │ │ ├── MixinBipedEntityModel.java │ │ └── MixinLivingEntity.java │ │ ├── potion_glint │ │ └── MixinPotionItem.java │ │ ├── r1_7_item_tilt │ │ └── MixinHeldItemRenderer.java │ │ ├── r1_7_tab_list_style │ │ ├── MixinClientPlayNetworkHandler.java │ │ ├── MixinPlayerListEntry.java │ │ └── MixinPlayerListHud.java │ │ ├── remove_newer_screen_features │ │ ├── MixinGameMenuScreen.java │ │ └── MixinScreen.java │ │ ├── secure_chat_warning │ │ └── MixinClientPlayNetworkHandler.java │ │ ├── strike_through_offset │ │ └── MixinTextRenderer_Drawer.java │ │ └── villager_profession │ │ └── MixinVillagerClothingFeatureRenderer.java │ └── settings │ └── VisualSettings.java └── resources ├── assets └── viafabricplus-visuals │ ├── sounds.json │ └── sounds │ └── oof_hurt.ogg ├── fabric.mod.json ├── viafabricplus-visuals.accesswidener └── viafabricplus-visuals.mixins.json /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | indent_size = 4 4 | indent_style = space 5 | insert_final_newline = true 6 | tab_width = 4 7 | 8 | [*.java] 9 | ij_java_class_count_to_use_import_on_demand = 999999 10 | ij_java_names_count_to_use_import_on_demand = 999999 11 | ij_java_imports_layout = *, |, $* 12 | ij_java_generate_final_locals = true 13 | ij_java_generate_final_parameters = true 14 | 15 | [{*.json,*.yml}] 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: FlorianMichael 2 | custom: [ "https://florianmichael.de/donate" ] 3 | ko_fi: rk_01 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report a bug in ViaFabricPlus 3 | labels: [ S-needs-triage, T-bug ] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | **Before reporting a bug, please see if using latest build from https://github.com/ViaVersion/ViaFabricPlus/actions fixes your issue.** 10 | Whenever you see fit, you can upload images or videos to any of the text fields. 11 | 12 | - type: textarea 13 | attributes: 14 | label: General Information 15 | description: | 16 | Please provide a ViaVersion dump, if you experience a crash, also the crash report (latest.log file). You can get both by 17 | going to `ViaFabricPlus -> Report issues` and using the buttons there. 18 | placeholder: | 19 | ViaVersion dump url: **paste here** 20 | Crash report url: **upload to mclo.gs and paste here** 21 | validations: 22 | required: true 23 | 24 | - type: textarea 25 | attributes: 26 | label: Bug Description 27 | description: | 28 | Describe the unexpected behavior. 29 | If you want to attach screenshots, use the comment field at the bottom of the page. 30 | placeholder: | 31 | Example: "Joining server xy causes my game to crash." 32 | validations: 33 | required: true 34 | 35 | - type: textarea 36 | attributes: 37 | label: Steps to Reproduce 38 | description: | 39 | List the steps on how we can reproduce the issue. Make sure I can easily understand what you mean with each step. 40 | placeholder: | 41 | Example: 42 | 1. Joining server xy with version 1.14.4 43 | 2. Game crashes 44 | validations: 45 | required: true 46 | 47 | - type: textarea 48 | attributes: 49 | label: Expected Behavior 50 | description: | 51 | Describe what exactly you expected to happen. 52 | placeholder: | 53 | Example: "the game should not crash when I join server xy." 54 | validations: 55 | required: true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Dev builds 4 | url: https://ci.viaversion.com/ 5 | about: Before reporting a bug, please check if using main builds from our ci fixes your issue. 6 | - name: ViaVersion Discord 7 | url: https://discord.gg/viaversion 8 | about: For smaller issues or questions, you can also join our Discord server. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest a feature to be added in ViaFabricPlus 3 | labels: [ S-needs-triage, T-feature ] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | **Before requesting a new feature, please see if using latest build from https://github.com/ViaVersion/ViaFabricPlus/actions already includes a solution.** 10 | Whenever you see fit, you can upload images or videos to any of the text fields. 11 | 12 | - type: textarea 13 | attributes: 14 | label: Problem Description 15 | description: | 16 | Describe the issue you are facing or why you need the feature to be added. 17 | placeholder: | 18 | I am always frustrated with... 19 | validations: 20 | required: true 21 | 22 | - type: textarea 23 | attributes: 24 | label: Solution Description 25 | description: | 26 | Describe the solution you would like to see. 27 | validations: 28 | required: true 29 | 30 | - type: textarea 31 | attributes: 32 | label: Alternatives 33 | description: | 34 | Describe alternatives you have considered. 35 | validations: 36 | required: false 37 | 38 | - type: textarea 39 | attributes: 40 | label: Additional Info 41 | description: | 42 | Does the feature apply to any specific version or environment? 43 | validations: 44 | required: false -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gradle" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "github-actions" 8 | directory: "/" 9 | schedule: 10 | interval: "weekly" -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: [ pull_request, push, workflow_dispatch ] 3 | 4 | jobs: 5 | build: 6 | runs-on: ubuntu-24.04 7 | steps: 8 | - name: Checkout Repository 9 | uses: actions/checkout@v4 10 | with: 11 | persist-credentials: false 12 | - name: Set up Gradle 13 | uses: gradle/actions/setup-gradle@v4 14 | - name: Set up JDK 21 15 | uses: actions/setup-java@v4 16 | with: 17 | distribution: 'temurin' 18 | java-version: 21 19 | check-latest: true 20 | - name: Build with Gradle 21 | run: ./gradlew build 22 | - name: Upload Artifacts to GitHub 23 | uses: actions/upload-artifact@v4 24 | with: 25 | name: Artifacts 26 | path: build/libs/ 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | 3 | .gradle/ 4 | build/ 5 | out/ 6 | classes/ 7 | .kotlin/ 8 | 9 | # Eclipse 10 | 11 | *.launch 12 | 13 | # Idea 14 | 15 | .idea/ 16 | *.iml 17 | *.ipr 18 | *.iws 19 | 20 | # VSCode 21 | 22 | .settings/ 23 | .vscode/ 24 | bin/ 25 | .classpath 26 | .project 27 | 28 | # macOS 29 | 30 | *.DS_Store 31 | 32 | # Misc 33 | 34 | run/ 35 | -------------------------------------------------------------------------------- /.idea/copyright/GPL_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/preview/bedrock_realms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/bedrock_realms.png -------------------------------------------------------------------------------- /docs/preview/betacraft_servers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/betacraft_servers.png -------------------------------------------------------------------------------- /docs/preview/classicube_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/classicube_login.png -------------------------------------------------------------------------------- /docs/preview/classicube_servers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/classicube_servers.png -------------------------------------------------------------------------------- /docs/preview/debug_hud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/debug_hud.png -------------------------------------------------------------------------------- /docs/preview/multiplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/multiplayer.png -------------------------------------------------------------------------------- /docs/preview/protocol_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/protocol_selection.png -------------------------------------------------------------------------------- /docs/preview/set_version_for_server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/set_version_for_server.png -------------------------------------------------------------------------------- /docs/preview/settings_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/docs/preview/settings_selection.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Gradle Properties 2 | org.gradle.jvmargs=-Xmx8G 3 | org.gradle.parallel=true 4 | 5 | # Project Details 6 | project_jvm_version=21 7 | 8 | project_group=com.viaversion 9 | project_version=4.1.5-SNAPSHOT 10 | project_description=Minecraft Fabric mod which allows you to join EVERY Minecraft server version (Classic, Alpha, Beta, Release, April Fools, Bedrock) 11 | 12 | publishing_dev_id=FlorianMichael 13 | publishing_dev_name=EnZaXD 14 | publishing_dev_mail=florian.michael07@gmail.com 15 | 16 | minecraft_version=1.21.5 17 | yarn_mappings_version=1.21.5+build.1 18 | fabric_loader_version=0.16.14 19 | fabric_api_version=0.124.0+1.21.5 20 | 21 | # Set to true for running the generator unit test 22 | updating_minecraft=false 23 | 24 | # Set to empty to use the Minecraft version above 25 | supported_minecraft_versions= 26 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=845952a9d6afa783db70bb3b0effaae45ae5542ca2bb7929619e8af49cb634cf 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenCentral() 4 | gradlePluginPortal() 5 | maven("https://maven.fabricmc.net/") 6 | } 7 | 8 | plugins { 9 | id("fabric-loom") version "1.10-SNAPSHOT" 10 | id("de.florianmichael.baseproject.BaseProject") version "1.0.7" 11 | } 12 | } 13 | 14 | plugins { 15 | id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" 16 | } 17 | 18 | rootProject.name = "viafabricplus" 19 | 20 | include("viafabricplus-api") 21 | include("viafabricplus-visuals") 22 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/base/Events.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.base; 23 | 24 | import com.viaversion.viafabricplus.api.events.ChangeProtocolVersionCallback; 25 | import com.viaversion.viafabricplus.api.events.LoadingCycleCallback; 26 | import net.fabricmc.fabric.api.event.Event; 27 | import net.fabricmc.fabric.api.event.EventFactory; 28 | 29 | public final class Events { 30 | 31 | public static final Event LOADING_CYCLE = EventFactory.createArrayBacked(LoadingCycleCallback.class, listeners -> state -> { 32 | for (LoadingCycleCallback listener : listeners) { 33 | listener.onLoadCycle(state); 34 | } 35 | }); 36 | 37 | public static final Event CHANGE_PROTOCOL_VERSION = EventFactory.createArrayBacked(ChangeProtocolVersionCallback.class, listeners -> (oldVersion, newVersion) -> { 38 | for (ChangeProtocolVersionCallback listener : listeners) { 39 | listener.onChangeProtocolVersion(oldVersion, newVersion); 40 | } 41 | }); 42 | 43 | } -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/base/ModMenuScreenFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.base; 23 | 24 | import com.terraformersmc.modmenu.api.ConfigScreenFactory; 25 | import com.terraformersmc.modmenu.api.ModMenuApi; 26 | import com.viaversion.viafabricplus.screen.impl.ProtocolSelectionScreen; 27 | 28 | /** 29 | * Implementation of the ModMenu integration allowing users to open the protocol selection screen from the mod menu. 30 | */ 31 | public final class ModMenuScreenFactory implements ModMenuApi { 32 | 33 | @Override 34 | public ConfigScreenFactory getModConfigScreenFactory() { 35 | return parent -> { 36 | // Sadly, we can't use the open() function here because mod menu needs the screen to be returned 37 | ProtocolSelectionScreen.INSTANCE.prevScreen = parent; 38 | return ProtocolSelectionScreen.INSTANCE; 39 | }; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/font/FontCacheReload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.font; 23 | 24 | import net.minecraft.client.MinecraftClient; 25 | import net.minecraft.client.font.FontStorage; 26 | 27 | public final class FontCacheReload { 28 | 29 | public static void reload() { 30 | if (MinecraftClient.getInstance() == null) { 31 | return; 32 | } 33 | 34 | for (final FontStorage storage : MinecraftClient.getInstance().fontManager.fontStorages.values()) { 35 | storage.bakedGlyphCache.clear(); 36 | storage.glyphCache.clear(); 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/interaction/replace_block_placement_logic/ActionResultException1_12_2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.interaction.replace_block_placement_logic; 23 | 24 | import net.minecraft.util.ActionResult; 25 | 26 | public final class ActionResultException1_12_2 extends RuntimeException { 27 | 28 | private final ActionResult actionResult; 29 | 30 | public ActionResultException1_12_2(final ActionResult actionResult) { 31 | this.actionResult = actionResult; 32 | } 33 | 34 | public ActionResult getActionResult() { 35 | return this.actionResult; 36 | } 37 | 38 | @Override 39 | public synchronized Throwable fillInStackTrace() { 40 | return this; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/item/negative_item_count/NegativeItemUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.item.negative_item_count; 23 | 24 | import com.viaversion.viafabricplus.util.ItemUtil; 25 | import com.viaversion.viaversion.protocols.v1_10to1_11.Protocol1_10To1_11; 26 | import net.minecraft.item.ItemStack; 27 | import net.minecraft.nbt.NbtCompound; 28 | 29 | public final class NegativeItemUtil { 30 | 31 | /** 32 | * Returns the actual amount of items in the stack, versions older or equal to 1.10 can have negative stack sizes 33 | * which are not represented by {@link ItemStack#getCount()}. 34 | * 35 | * @param stack The stack to get the count from 36 | * @return The actual amount of items in the stack 37 | */ 38 | public static int getCount(final ItemStack stack) { 39 | final NbtCompound tag = ItemUtil.getTagOrNull(stack); 40 | if (tag != null) { 41 | return tag.getInt(ItemUtil.vvNbtName(Protocol1_10To1_11.class), stack.getCount()); 42 | } else { 43 | return stack.getCount(); 44 | } 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/mouse_sensitivity/MouseSensitivity1_13_2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.mouse_sensitivity; 23 | 24 | import it.unimi.dsi.fastutil.floats.FloatIntPair; 25 | 26 | public final class MouseSensitivity1_13_2 { 27 | 28 | public static FloatIntPair get1_13SliderValue(final float value1_14) { 29 | final int oldSliderWidth = 150 - 8; 30 | final int mousePos = (int) (oldSliderWidth * value1_14); 31 | final float oldValue = mousePos / (float) oldSliderWidth; 32 | final int oldDisplay = (int) (oldValue * 200); 33 | return FloatIntPair.of(oldValue, oldDisplay); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/movement/elytra/FabricAPIWorkaround.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.movement.elytra; 23 | 24 | import net.lenni0451.reflect.stream.RStream; 25 | import java.util.Set; 26 | 27 | public final class FabricAPIWorkaround { 28 | 29 | public static void init() { 30 | // Force unload some FabricAPI mixins because FabricAPI overwrites some of the elytra code 31 | final Set loadedMixins = RStream.of("org.spongepowered.asm.mixin.transformer.MixinConfig").fields().by("globalMixinList").get(); 32 | loadedMixins.add("net.fabricmc.fabric.mixin.client.entity.event.elytra.ClientPlayerEntityMixin"); 33 | loadedMixins.add("net.fabricmc.fabric.mixin.entity.event.elytra.LivingEntityMixin"); 34 | loadedMixins.add("net.fabricmc.fabric.mixin.entity.event.elytra.PlayerEntityMixin"); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/features/networking/legacy_chat_signature/KeyPairResponse1_19_0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.features.networking.legacy_chat_signature; 23 | 24 | import com.mojang.authlib.yggdrasil.response.KeyPairResponse; 25 | 26 | import java.nio.ByteBuffer; 27 | 28 | /** 29 | * This class is part of the AuthLib, we are overwriting this class to add the {@link #publicKeySignature} field. 30 | */ 31 | 32 | public record KeyPairResponse1_19_0( 33 | KeyPairResponse.KeyPair keyPair, 34 | ByteBuffer publicKeySignatureV2, 35 | ByteBuffer publicKeySignature /* removed in 1.20-rc1 */, 36 | String expiresAt, 37 | String refreshedAfter) { 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/IClientConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base; 23 | 24 | import com.viaversion.viaversion.api.connection.UserConnection; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | 27 | public interface IClientConnection { 28 | 29 | void viaFabricPlus$setupPreNettyDecryption(); 30 | 31 | ProtocolVersion viaFabricPlus$getTargetVersion(); 32 | 33 | void viaFabricPlus$setTargetVersion(final ProtocolVersion serverVersion); 34 | 35 | UserConnection viaFabricPlus$getUserConnection(); 36 | 37 | void viaFabricPlus$setUserConnection(final UserConnection connection); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/IExtensionProtocolMetadataStorage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base; 23 | 24 | import net.raphimc.vialegacy.protocol.classic.c0_30cpetoc0_28_30.data.ClassicProtocolExtension; 25 | 26 | import java.util.EnumMap; 27 | 28 | public interface IExtensionProtocolMetadataStorage { 29 | 30 | EnumMap viaFabricPlus$getServerExtensions(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/IMultiValueDebugSampleLogImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base; 23 | 24 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 25 | 26 | public interface IMultiValueDebugSampleLogImpl { 27 | 28 | ProtocolVersion viaFabricPlus$getForcedVersion(); 29 | 30 | void viaFabricPlus$setForcedVersion(final ProtocolVersion version); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/IServerInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base; 23 | 24 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 25 | 26 | public interface IServerInfo { 27 | 28 | ProtocolVersion viaFabricPlus$forcedVersion(); 29 | 30 | void viaFabricPlus$forceVersion(final ProtocolVersion version); 31 | 32 | boolean viaFabricPlus$passedDirectConnectScreen(); 33 | 34 | void viaFabricPlus$passDirectConnectScreen(final boolean state); 35 | 36 | ProtocolVersion viaFabricPlus$translatingVersion(); 37 | 38 | void viaFabricPlus$setTranslatingVersion(final ProtocolVersion version); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/ITextFieldWidget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base; 23 | 24 | public interface ITextFieldWidget { 25 | 26 | void viaFabricPlus$unlockForbiddenCharacters(); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/bedrock/IChunkTracker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base.bedrock; 23 | 24 | public interface IChunkTracker { 25 | 26 | int viaFabricPlus$getSubChunkRequests(); 27 | 28 | int viaFabricPlus$getPendingSubChunks(); 29 | 30 | int viaFabricPlus$getChunks(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/bedrock/IConfirmScreen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base.bedrock; 23 | 24 | import net.minecraft.text.Text; 25 | 26 | public interface IConfirmScreen { 27 | 28 | void viaFabricPlus$setMessage(final Text message); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/base/bedrock/IRakSessionCodec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.base.bedrock; 23 | 24 | public interface IRakSessionCodec { 25 | 26 | int viaFabricPlus$getOutgoingPackets(); 27 | 28 | int viaFabricPlus$SentDatagrams(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/block/shape/IHorizontalConnectingBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.block.shape; 23 | 24 | import net.minecraft.block.BlockState; 25 | 26 | public interface IHorizontalConnectingBlock { 27 | 28 | int viaFabricPlus$getShapeIndex(final BlockState state); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/entity/r1_8_boat/IAbstractBoatEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.entity.r1_8_boat; 23 | 24 | import net.minecraft.util.math.Vec3d; 25 | 26 | public interface IAbstractBoatEntity { 27 | 28 | void viaFabricPlus$setBoatInterpolationSteps(final int steps); 29 | 30 | Vec3d viaFabricPlus$getBoatVelocity(); 31 | 32 | void viaFabricPlus$setBoatVelocity(final Vec3d velocity); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/execute_inputs_sync/IMouseKeyboard.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.execute_inputs_sync; 23 | 24 | import java.util.Queue; 25 | 26 | public interface IMouseKeyboard { 27 | 28 | Queue viaFabricPlus$getPendingScreenEvents(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/interaction/container_clicking/IScreenHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.interaction.container_clicking; 23 | 24 | public interface IScreenHandler { 25 | 26 | short viaFabricPlus$getActionId(); 27 | 28 | short viaFabricPlus$incrementAndGetActionId(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/interaction/r1_18_2_block_ack_emulation/IClientPlayerInteractionManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.interaction.r1_18_2_block_ack_emulation; 23 | 24 | import com.viaversion.viafabricplus.features.interaction.r1_18_2_block_ack_emulation.ClientPlayerInteractionManager1_18_2; 25 | 26 | public interface IClientPlayerInteractionManager { 27 | 28 | ClientPlayerInteractionManager1_18_2 viaFabricPlus$get1_18_2InteractionManager(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/networking/downloading_terrain/IDownloadingTerrainScreen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.networking.downloading_terrain; 23 | 24 | public interface IDownloadingTerrainScreen { 25 | 26 | void viaFabricPlus$setReady(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/networking/legacy_chat_signature/ILegacyKeySignatureStorage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.networking.legacy_chat_signature; 23 | 24 | public interface ILegacyKeySignatureStorage { 25 | 26 | byte[] viafabricplus$getLegacyPublicKeySignature(); 27 | 28 | void viafabricplus$setLegacyPublicKeySignature(final byte[] signature); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/access/world/always_tick_entities/IEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.access.world.always_tick_entities; 23 | 24 | public interface IEntity { 25 | 26 | boolean viaFabricPlus$isInLoadedChunkAndShouldTick(); 27 | 28 | void viaFabricPlus$setInLoadedChunkAndShouldTick(final boolean inLoadedChunkAndShouldTick); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/MixinMain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base; 23 | 24 | import com.viaversion.viafabricplus.ViaFabricPlusImpl; 25 | import net.minecraft.client.main.Main; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 30 | 31 | @Mixin(Main.class) 32 | public abstract class MixinMain { 33 | 34 | @Inject(method = "main", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;startTimerHack()V")) 35 | private static void bootstrap(CallbackInfo ci) { 36 | ViaFabricPlusImpl.INSTANCE.init(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/access/MixinMultiValueDebugSampleLogImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.access; 23 | 24 | import com.viaversion.viafabricplus.injection.access.base.IMultiValueDebugSampleLogImpl; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.util.profiler.MultiValueDebugSampleLogImpl; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.Unique; 29 | 30 | @Mixin(MultiValueDebugSampleLogImpl.class) 31 | public abstract class MixinMultiValueDebugSampleLogImpl implements IMultiValueDebugSampleLogImpl { 32 | 33 | @Unique 34 | private ProtocolVersion viaFabricPlus$forcedVersion; 35 | 36 | @Override 37 | public ProtocolVersion viaFabricPlus$getForcedVersion() { 38 | return this.viaFabricPlus$forcedVersion; 39 | } 40 | 41 | @Override 42 | public void viaFabricPlus$setForcedVersion(ProtocolVersion version) { 43 | this.viaFabricPlus$forcedVersion = version; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/connection/MixinClientConnection_1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.connection; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import io.netty.channel.Channel; 26 | import net.minecraft.network.ClientConnection; 27 | import org.spongepowered.asm.mixin.Final; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.Shadow; 30 | import org.spongepowered.asm.mixin.injection.At; 31 | import org.spongepowered.asm.mixin.injection.Inject; 32 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 33 | 34 | @Mixin(targets = "net.minecraft.network.ClientConnection$1") 35 | public abstract class MixinClientConnection_1 { 36 | 37 | @Final 38 | @Shadow 39 | ClientConnection field_11663; 40 | 41 | @Inject(method = "initChannel", at = @At("RETURN")) 42 | private void injectViaIntoPipeline(Channel channel, CallbackInfo ci) { 43 | ProtocolTranslator.injectViaPipeline(this.field_11663, channel); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/connection/MixinConnectScreen_1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.connection; 23 | 24 | import com.llamalad7.mixinextras.injector.wrapoperation.Operation; 25 | import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | 29 | @Mixin(targets = "net.minecraft.client.gui.screen.multiplayer.ConnectScreen$1") 30 | public abstract class MixinConnectScreen_1 { 31 | 32 | @WrapOperation(method = "run", at = @At(value = "INVOKE", target = "Ljava/lang/Exception;getMessage()Ljava/lang/String;", remap = false)) 33 | private String handleNullExceptionMessage(Exception instance, Operation original) { 34 | // Vanilla doesn't have these cases, but we do because of RakNet and other modifications to the Netty pipeline 35 | return instance.getMessage() == null ? "" : original.call(instance); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/connection/MixinGameOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.connection; 23 | 24 | import com.viaversion.viafabricplus.ViaFabricPlusImpl; 25 | import net.minecraft.client.option.GameOptions; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.Overwrite; 28 | import org.spongepowered.asm.mixin.Shadow; 29 | 30 | @Mixin(GameOptions.class) 31 | public abstract class MixinGameOptions { 32 | 33 | @Shadow 34 | public boolean useNativeTransport; 35 | 36 | /** 37 | * @author RK_01 38 | * @reason Needed as an indicator if the client wants to ping a server or connect to a server 39 | */ 40 | @Overwrite 41 | public boolean shouldUseNativeTransport() { 42 | if (!this.useNativeTransport) { 43 | ViaFabricPlusImpl.INSTANCE.getLogger().error("Native transport is disabled, but enabling it anyway since we use it as an indicator if the client wants to ping a server or connect to a server."); 44 | } 45 | return true; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/MixinViaLegacyConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.integration; 23 | 24 | import com.viaversion.viafabricplus.settings.impl.GeneralSettings; 25 | import net.raphimc.vialegacy.ViaLegacyConfig; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 30 | 31 | @Mixin(value = ViaLegacyConfig.class, remap = false) 32 | public abstract class MixinViaLegacyConfig { 33 | 34 | @Inject(method = {"isLegacySkullLoading", "isLegacySkinLoading"}, at = @At("HEAD"), cancellable = true) 35 | private void replaceWithVFPSetting(CallbackInfoReturnable cir) { 36 | cir.setReturnValue(GeneralSettings.INSTANCE.loadSkinsAndSkullsInLegacyVersions.getValue()); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/base/integration/event/MixinMinecraftClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.base.integration.event; 23 | 24 | import com.viaversion.viafabricplus.api.events.LoadingCycleCallback; 25 | import com.viaversion.viafabricplus.base.Events; 26 | import net.minecraft.client.MinecraftClient; 27 | import net.minecraft.client.RunArgs; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Inject; 31 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 32 | 33 | @Mixin(MinecraftClient.class) 34 | public abstract class MixinMinecraftClient { 35 | 36 | @Inject(method = "", at = @At("RETURN")) 37 | private void callPostGameLoadEvent(RunArgs args, CallbackInfo ci) { 38 | Events.LOADING_CYCLE.invoker().onLoadCycle(LoadingCycleCallback.LoadingCycle.POST_GAME_LOAD); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/compat/minecraftauth/MixinClasses.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.compat.minecraftauth; 23 | 24 | import io.jsonwebtoken.lang.Classes; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.injection.At; 27 | import org.spongepowered.asm.mixin.injection.Inject; 28 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 29 | 30 | /* 31 | * JsonWebToken is used by MinecraftAuth, and since it's using Java services, it's not working with the fabric loader, 32 | * So we have to change all services usages by using the normal Java API 33 | */ 34 | @Mixin(value = Classes.class, remap = false) 35 | public abstract class MixinClasses { 36 | 37 | @Inject(method = "forName", at = @At("HEAD"), cancellable = true) 38 | private static void removeServicesSupport(String fqcn, CallbackInfoReturnable> cir) throws ClassNotFoundException { 39 | cir.setReturnValue((Class) Class.forName(fqcn)); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/compat/minecraftauth/MixinDefaultJwtParserBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.compat.minecraftauth; 23 | 24 | import io.jsonwebtoken.gson.io.GsonDeserializer; 25 | import io.jsonwebtoken.impl.DefaultJwtParserBuilder; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Redirect; 29 | 30 | /* 31 | * JsonWebToken is used by MinecraftAuth, and since it's using Java services, it's not working with the fabric loader, 32 | * So we have to change all services usages by using the normal Java API 33 | */ 34 | @Mixin(value = DefaultJwtParserBuilder.class, remap = false) 35 | public abstract class MixinDefaultJwtParserBuilder { 36 | 37 | @Redirect(method = "build()Lio/jsonwebtoken/JwtParser;", at = @At(value = "INVOKE", target = "Lio/jsonwebtoken/impl/lang/Services;get(Ljava/lang/Class;)Ljava/lang/Object;")) 38 | public Object removeServicesSupport(Class spi) { 39 | return new GsonDeserializer<>(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/block/interaction/MixinNoteBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.block.interaction; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.block.NoteBlock; 27 | import net.minecraft.util.ActionResult; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Inject; 31 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 32 | 33 | @Mixin(NoteBlock.class) 34 | public abstract class MixinNoteBlock { 35 | 36 | @Inject(method = "onUseWithItem", at = @At("HEAD"), cancellable = true) 37 | private void cancelMobHeadUsage(CallbackInfoReturnable cir) { 38 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_19_4)) { 39 | cir.setReturnValue(ActionResult.SUCCESS); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/classic/cpe_extension/MixinClientboundPacketsc0_30cpe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.classic.cpe_extension; 23 | 24 | import com.viaversion.viafabricplus.features.classic.cpe_extension.CPEAdditions; 25 | import net.raphimc.vialegacy.protocol.classic.c0_30cpetoc0_28_30.packet.ClientboundPacketsc0_30cpe; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 30 | 31 | @Mixin(value = ClientboundPacketsc0_30cpe.class, remap = false) 32 | public abstract class MixinClientboundPacketsc0_30cpe { 33 | 34 | @Inject(method = "getPacket", at = @At("HEAD"), cancellable = true) 35 | private static void addCustomPackets(int id, CallbackInfoReturnable cir) { 36 | if (CPEAdditions.CUSTOM_PACKETS.containsKey(id)) { 37 | cir.setReturnValue(CPEAdditions.CUSTOM_PACKETS.get(id)); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/classic/world_height/MixinWorldPacketRewriter1_16_2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.classic.world_height; 23 | 24 | import com.viaversion.viaversion.protocols.v1_16_1to1_16_2.rewriter.WorldPacketRewriter1_16_2; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.injection.Constant; 27 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 28 | 29 | @Mixin(value = WorldPacketRewriter1_16_2.class, remap = false) 30 | public abstract class MixinWorldPacketRewriter1_16_2 { 31 | 32 | @ModifyConstant(method = "lambda$register$0", constant = @Constant(intValue = 16)) 33 | private static int modifySectionCountToSupportClassicWorldHeight(int constant) { 34 | return 64; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/entity/interaction/MixinArmadilloEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.entity.interaction; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.passive.ArmadilloEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Redirect; 30 | 31 | @Mixin(ArmadilloEntity.class) 32 | public abstract class MixinArmadilloEntity { 33 | 34 | @Redirect(method = "interactMob", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/ArmadilloEntity;isNotIdle()Z")) 35 | private boolean changeCondition(ArmadilloEntity instance) { 36 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_5)) { 37 | return false; 38 | } else { 39 | return instance.isNotIdle(); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/entity/interaction/MixinSquidEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.entity.interaction; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.passive.SquidEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 31 | 32 | @Mixin(SquidEntity.class) 33 | public abstract class MixinSquidEntity { 34 | 35 | @Inject(method = "canBeLeashed", at = @At("HEAD"), cancellable = true) 36 | private void cancelLeashing(CallbackInfoReturnable cir) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_16_4)) { 38 | cir.setReturnValue(false); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/entity/metadata_handling/MixinCommonBoss.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.entity.metadata_handling; 23 | 24 | import com.viaversion.viaversion.legacy.bossbar.CommonBoss; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.injection.At; 27 | import org.spongepowered.asm.mixin.injection.Redirect; 28 | 29 | @Mixin(value = CommonBoss.class, remap = false) 30 | public abstract class MixinCommonBoss { 31 | 32 | @Redirect(method = {"", "setHealth"}, at = @At(value = "INVOKE", target = "Lcom/google/common/base/Preconditions;checkArgument(ZLjava/lang/Object;)V")) 33 | private void ignoreHealthCheck(boolean expression, Object errorMessage) { 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/entity/r1_8_boat/MixinEntityModels.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.entity.r1_8_boat; 23 | 24 | import com.google.common.collect.ImmutableMap; 25 | import com.viaversion.viafabricplus.features.entity.r1_8_boat.BoatModel1_8; 26 | import net.minecraft.client.model.TexturedModelData; 27 | import net.minecraft.client.render.entity.model.EntityModelLayer; 28 | import net.minecraft.client.render.entity.model.EntityModels; 29 | import org.spongepowered.asm.mixin.Mixin; 30 | import org.spongepowered.asm.mixin.injection.At; 31 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 32 | 33 | @Mixin(EntityModels.class) 34 | public abstract class MixinEntityModels { 35 | 36 | @ModifyVariable(method = "getModels", at = @At(value = "STORE", ordinal = 0), ordinal = 0) 37 | private static ImmutableMap.Builder addBoatModel(ImmutableMap.Builder builder) { 38 | return builder.put(BoatModel1_8.MODEL_LAYER, BoatModel1_8.getTexturedModelData()); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/footstep_particle/MixinMappingDataBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.footstep_particle; 23 | 24 | import com.viaversion.viafabricplus.features.footstep_particle.FootStepParticle1_12_2; 25 | import com.viaversion.viaversion.api.data.MappingDataBase; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 30 | 31 | @Mixin(value = MappingDataBase.class, remap = false) 32 | public abstract class MixinMappingDataBase { 33 | 34 | @Inject(method = "getNewParticleId", at = @At("HEAD"), cancellable = true) 35 | private void passthroughFootStepParticle(int id, CallbackInfoReturnable cir) { 36 | if (id == FootStepParticle1_12_2.RAW_ID) { 37 | cir.setReturnValue(id); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/interaction/container_clicking/MixinStructuredItemRewriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.interaction.container_clicking; 23 | 24 | import com.viaversion.viaversion.api.data.entity.EntityTracker; 25 | import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.BlockItemPacketRewriter1_21_5; 26 | import com.viaversion.viaversion.rewriter.StructuredItemRewriter; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Redirect; 30 | 31 | @Mixin(value = { BlockItemPacketRewriter1_21_5.class, StructuredItemRewriter.class }, remap = false) 32 | public abstract class MixinStructuredItemRewriter { 33 | 34 | @Redirect(method = "*", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/data/entity/EntityTracker;canInstaBuild()Z")) 35 | private boolean dontCancelPackets(EntityTracker entityTracker) { 36 | return true; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/interaction/cooldown/MixinItemCooldownManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.interaction.cooldown; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.ItemCooldownManager; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 31 | 32 | @Mixin(value = ItemCooldownManager.class) 33 | public abstract class MixinItemCooldownManager { 34 | 35 | @Inject(method = "set(Lnet/minecraft/util/Identifier;I)V", at = @At("HEAD"), cancellable = true) 36 | private void dontSetCooldown(CallbackInfo ci) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) { 38 | ci.cancel(); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/interaction/cooldown/MixinPlayerEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.interaction.cooldown; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.PlayerEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 31 | 32 | @Mixin(PlayerEntity.class) 33 | public abstract class MixinPlayerEntity { 34 | 35 | @Inject(method = "getAttackCooldownProgress", at = @At("HEAD"), cancellable = true) 36 | private void removeAttackCooldown(CallbackInfoReturnable ci) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) { 38 | ci.setReturnValue(1F); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/item/interaction/MixinBrushItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.item.interaction; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.PlayerEntity; 27 | import net.minecraft.item.BrushItem; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Redirect; 31 | 32 | @Mixin(BrushItem.class) 33 | public abstract class MixinBrushItem { 34 | 35 | @Redirect(method = "getHitResult", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getBlockInteractionRange()D")) 36 | private double modifyReachDistance(PlayerEntity instance) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_2)) { 38 | return 5D; 39 | } else { 40 | return instance.getBlockInteractionRange(); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/item/interaction/MixinBundleItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.item.interaction; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.item.BundleItem; 27 | import net.minecraft.util.ActionResult; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Redirect; 31 | 32 | @Mixin(BundleItem.class) 33 | public abstract class MixinBundleItem { 34 | 35 | @Redirect(method = "use", at = @At(value = "FIELD", target = "Lnet/minecraft/util/ActionResult;SUCCESS:Lnet/minecraft/util/ActionResult$Success;")) 36 | private ActionResult.Success dontSwing() { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21_2)) { 38 | return ActionResult.CONSUME; 39 | } else { 40 | return ActionResult.SUCCESS; 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/limitation/max_chat_length/MixinChatMessageC2SPacket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.limitation.max_chat_length; 23 | 24 | import com.viaversion.viafabricplus.features.limitation.max_chat_length.MaxChatLength; 25 | import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.Constant; 28 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 29 | 30 | @Mixin(ChatMessageC2SPacket.class) 31 | public abstract class MixinChatMessageC2SPacket { 32 | 33 | @ModifyConstant(method = "write", constant = @Constant(intValue = 256)) 34 | private int modifyChatLength(int maxLength) { 35 | return MaxChatLength.getChatLength(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/limitation/max_chat_length/MixinProtocol1_10To1_11.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.limitation.max_chat_length; 23 | 24 | import com.viaversion.viafabricplus.features.limitation.max_chat_length.MaxChatLength; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.injection.Constant; 27 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 28 | 29 | @Mixin(targets = "com.viaversion.viaversion.protocols.v1_10to1_11.Protocol1_10To1_11$6", remap = false) 30 | public abstract class MixinProtocol1_10To1_11 { 31 | 32 | @ModifyConstant(method = "lambda$register$0", constant = @Constant(intValue = 100)) 33 | private static int changeMaxChatLength(int constant) { 34 | return MaxChatLength.getChatLength(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/limitation/max_chat_length/MixinStringHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.limitation.max_chat_length; 23 | 24 | import com.llamalad7.mixinextras.injector.ModifyExpressionValue; 25 | import com.viaversion.viafabricplus.features.limitation.max_chat_length.MaxChatLength; 26 | import net.minecraft.util.StringHelper; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | 30 | @Mixin(StringHelper.class) 31 | public abstract class MixinStringHelper { 32 | 33 | @ModifyExpressionValue(method = "truncateChat", at = @At(value = "CONSTANT", args = "intValue=256")) 34 | private static int modifyMaxChatLength(int constant) { 35 | return MaxChatLength.getChatLength(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinBedBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.collision; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.block.BedBlock; 27 | import net.minecraft.entity.Entity; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Inject; 31 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 32 | 33 | @Mixin(BedBlock.class) 34 | public abstract class MixinBedBlock { 35 | 36 | @Inject(method = "bounceEntity", at = @At("HEAD"), cancellable = true) 37 | private void cancelEntityBounce(Entity entity, CallbackInfo ci) { 38 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_11_1)) { 39 | ci.cancel(); 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/collision/MixinHoneyBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.collision; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.block.HoneyBlock; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 31 | 32 | @Mixin(HoneyBlock.class) 33 | public abstract class MixinHoneyBlock { 34 | 35 | @Inject(method = {"method_65067", "method_65068"}, at = @At("HEAD"), cancellable = true) 36 | private static void simplifyVelocityComparisons(double d, CallbackInfoReturnable cir) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) { 38 | cir.setReturnValue(d); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/constants/MixinClientPlayerEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.constants; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.client.network.ClientPlayerEntity; 27 | import net.minecraft.util.math.MathHelper; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Redirect; 31 | 32 | @Mixin(ClientPlayerEntity.class) 33 | public abstract class MixinClientPlayerEntity { 34 | 35 | @Redirect(method = "sendMovementPackets", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;square(D)D")) 36 | private double changeMagnitude(double n) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_18)) { 38 | return 9.0E-4D; 39 | } else { 40 | return MathHelper.square(n); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/elytra/MixinFireworkRocketItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.elytra; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.PlayerEntity; 27 | import net.minecraft.item.FireworkRocketItem; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Redirect; 31 | 32 | @Mixin(FireworkRocketItem.class) 33 | public abstract class MixinFireworkRocketItem { 34 | 35 | @Redirect(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isGliding()Z", ordinal = 0)) 36 | private boolean disableFireworkElytraBoost(PlayerEntity player) { 37 | return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_11) && player.isGliding(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/limitation/rotation/MixinPlayerEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.limitation.rotation; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.PlayerEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Redirect; 30 | 31 | @Mixin(PlayerEntity.class) 32 | public abstract class MixinPlayerEntity { 33 | 34 | @Redirect(method = "getMaxRelativeHeadRotation", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isBlocking()Z")) 35 | private boolean dontModifyHeadRotationWhenBlocking(PlayerEntity instance) { 36 | return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_20_2) && instance.isBlocking(); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/slowdown/MixinEnderEyeItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.slowdown; 23 | 24 | import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; 25 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 26 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 27 | import net.minecraft.entity.player.PlayerEntity; 28 | import net.minecraft.item.EnderEyeItem; 29 | import net.minecraft.util.Hand; 30 | import org.spongepowered.asm.mixin.Mixin; 31 | import org.spongepowered.asm.mixin.injection.At; 32 | 33 | @Mixin(EnderEyeItem.class) 34 | public abstract class MixinEnderEyeItem { 35 | 36 | @WrapWithCondition(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;setCurrentHand(Lnet/minecraft/util/Hand;)V")) 37 | private boolean removeItemSlowdown(PlayerEntity instance, Hand hand) { 38 | return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_11); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/movement/water/MixinItemEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.movement.water; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.ItemEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 31 | 32 | @Mixin(ItemEntity.class) 33 | public abstract class MixinItemEntity { 34 | 35 | @Inject(method = "applyWaterBuoyancy", at = @At("HEAD"), cancellable = true) 36 | private void dontApplyWaterBuoyancy(CallbackInfo ci) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_12_2)) { 38 | ci.cancel(); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/config_state/MixinNetworkStateTransitions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.config_state; 23 | 24 | import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; 25 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 26 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 27 | import io.netty.channel.ChannelConfig; 28 | import net.minecraft.network.handler.NetworkStateTransitions; 29 | import org.spongepowered.asm.mixin.Mixin; 30 | import org.spongepowered.asm.mixin.injection.At; 31 | 32 | @Mixin(NetworkStateTransitions.class) 33 | public abstract class MixinNetworkStateTransitions { 34 | 35 | @WrapWithCondition(method = "method_56353", at = @At(value = "INVOKE", target = "Lio/netty/channel/ChannelConfig;setAutoRead(Z)Lio/netty/channel/ChannelConfig;", remap = false)) 36 | private static boolean dontChangeAutoRead(ChannelConfig instance, boolean b) { 37 | return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_5); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/downloading_terrain/MixinEntityPacketRewriter1_20_3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.downloading_terrain; 23 | 24 | import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; 25 | import com.viaversion.viaversion.protocols.v1_20_2to1_20_3.rewriter.EntityPacketRewriter1_20_3; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 30 | 31 | @Mixin(value = EntityPacketRewriter1_20_3.class, remap = false) 32 | public abstract class MixinEntityPacketRewriter1_20_3 { 33 | 34 | @Inject(method = "sendChunksSentGameEvent", at = @At("HEAD"), cancellable = true) 35 | private void cancelGameStatePacket(PacketWrapper wrapper, CallbackInfo ci) { 36 | ci.cancel(); // Handled in MixinClientPlayNetworkHandler 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/keep_player_loaded/MixinPlayerEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.keep_player_loaded; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.entity.player.PlayerEntity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 31 | 32 | @Mixin(PlayerEntity.class) 33 | public abstract class MixinPlayerEntity { 34 | 35 | @Inject(method = "isLoaded", at = @At("HEAD"), cancellable = true) 36 | private void alwaysLoadPlayer(CallbackInfoReturnable cir) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21_2)) { 38 | cir.setReturnValue(true); 39 | } 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/legacy_chat_signature/MixinKeyPairResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.legacy_chat_signature; 23 | 24 | import com.mojang.authlib.yggdrasil.response.KeyPairResponse; 25 | import com.viaversion.viafabricplus.injection.access.networking.legacy_chat_signature.ILegacyKeySignatureStorage; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.Unique; 28 | 29 | @Mixin(value = KeyPairResponse.class, remap = false) 30 | public abstract class MixinKeyPairResponse implements ILegacyKeySignatureStorage { 31 | 32 | @Unique 33 | private byte[] viaFabricPlus$legacyKeySignature; 34 | 35 | @Override 36 | public byte[] viafabricplus$getLegacyPublicKeySignature() { 37 | return this.viaFabricPlus$legacyKeySignature; 38 | } 39 | 40 | @Override 41 | public void viafabricplus$setLegacyPublicKeySignature(byte[] signature) { 42 | this.viaFabricPlus$legacyKeySignature = signature; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/legacy_chat_signature/MixinPlayerPublicKey_PublicKeyData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.legacy_chat_signature; 23 | 24 | import com.viaversion.viafabricplus.injection.access.networking.legacy_chat_signature.ILegacyKeySignatureStorage; 25 | import net.minecraft.network.encryption.PlayerPublicKey; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.Unique; 28 | 29 | @Mixin(PlayerPublicKey.PublicKeyData.class) 30 | public abstract class MixinPlayerPublicKey_PublicKeyData implements ILegacyKeySignatureStorage { 31 | 32 | @Unique 33 | private byte[] viaFabricPlus$legacyKeySignature; 34 | 35 | @Override 36 | public byte[] viafabricplus$getLegacyPublicKeySignature() { 37 | return this.viaFabricPlus$legacyKeySignature; 38 | } 39 | 40 | @Override 41 | public void viafabricplus$setLegacyPublicKeySignature(byte[] signature) { 42 | this.viaFabricPlus$legacyKeySignature = signature; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinNamedCompoundTagType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.limitation.nbt; 23 | 24 | import com.viaversion.nbt.limiter.TagLimiter; 25 | import com.viaversion.viaversion.api.type.types.misc.NamedCompoundTagType; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Redirect; 29 | 30 | @Mixin(value = NamedCompoundTagType.class, remap = false) 31 | public abstract class MixinNamedCompoundTagType { 32 | 33 | @Redirect(method = "read(Lio/netty/buffer/ByteBuf;Z)Lcom/viaversion/nbt/tag/CompoundTag;", at = @At(value = "INVOKE", target = "Lcom/viaversion/nbt/limiter/TagLimiter;create(II)Lcom/viaversion/nbt/limiter/TagLimiter;")) 34 | private static TagLimiter removeNBTSizeLimit(int maxBytes, int maxLevels) { 35 | return TagLimiter.noop(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/limitation/nbt/MixinTagType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.limitation.nbt; 23 | 24 | import com.viaversion.nbt.limiter.TagLimiter; 25 | import com.viaversion.viaversion.api.type.types.misc.TagType; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Redirect; 29 | 30 | @Mixin(value = TagType.class, remap = false) 31 | public abstract class MixinTagType { 32 | 33 | @Redirect(method = "read(Lio/netty/buffer/ByteBuf;)Lcom/viaversion/nbt/tag/Tag;", at = @At(value = "INVOKE", target = "Lcom/viaversion/nbt/limiter/TagLimiter;create(II)Lcom/viaversion/nbt/limiter/TagLimiter;")) 34 | private TagLimiter removeNBTSizeLimit(int maxBytes, int maxLevels) { 35 | return TagLimiter.noop(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/networking/remove_legacy_pinger/MixinMultiplayerServerListPinger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.networking.remove_legacy_pinger; 23 | 24 | import net.minecraft.client.network.MultiplayerServerListPinger; 25 | import net.minecraft.client.network.ServerAddress; 26 | import net.minecraft.client.network.ServerInfo; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.Overwrite; 29 | 30 | import java.net.InetSocketAddress; 31 | 32 | @Mixin(MultiplayerServerListPinger.class) 33 | public abstract class MixinMultiplayerServerListPinger { 34 | 35 | /** 36 | * @author RK_01 37 | * @reason Remove legacy ping which didn't even work 38 | */ 39 | @Overwrite 40 | public void ping(InetSocketAddress socketAddress, ServerAddress address, ServerInfo serverInfo) { 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/recipe/MixinEntityPacketRewriter1_12.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.recipe; 23 | 24 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.injection.At; 27 | import org.spongepowered.asm.mixin.injection.Redirect; 28 | 29 | @Mixin(targets = "com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.EntityPacketRewriter1_12$1", remap = false) 30 | public abstract class MixinEntityPacketRewriter1_12 { 31 | 32 | @Redirect(method = "lambda$register$1", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;newerThanOrEqualTo(Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;)Z")) 33 | private static boolean dontClearRecipes(ProtocolVersion instance, ProtocolVersion other) { 34 | return false; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/swinging/MixinInventoryTracker1_16.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.swinging; 23 | 24 | import com.viaversion.viaversion.protocols.v1_15_2to1_16.storage.InventoryTracker1_16; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.Overwrite; 27 | 28 | @Mixin(value = InventoryTracker1_16.class, remap = false) 29 | public abstract class MixinInventoryTracker1_16 { 30 | 31 | /** 32 | * @author RK_01 33 | * @reason Fix ViaVersion cancelling swing packets even when no inventory is open 34 | */ 35 | @Overwrite 36 | public boolean isInventoryOpen() { 37 | return false; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/world/always_tick_entities/MixinEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.world.always_tick_entities; 23 | 24 | import com.viaversion.viafabricplus.injection.access.world.always_tick_entities.IEntity; 25 | import com.viaversion.viafabricplus.settings.impl.DebugSettings; 26 | import net.minecraft.entity.Entity; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.Unique; 29 | 30 | @Mixin(Entity.class) 31 | public abstract class MixinEntity implements IEntity { 32 | 33 | @Unique 34 | private boolean viaFabricPlus$isInLoadedChunkAndShouldTick; 35 | 36 | @Override 37 | public boolean viaFabricPlus$isInLoadedChunkAndShouldTick() { 38 | return this.viaFabricPlus$isInLoadedChunkAndShouldTick || DebugSettings.INSTANCE.alwaysTickClientPlayer.isEnabled(); 39 | } 40 | 41 | @Override 42 | public void viaFabricPlus$setInLoadedChunkAndShouldTick(final boolean inLoadedChunkAndShouldTick) { 43 | this.viaFabricPlus$isInLoadedChunkAndShouldTick = inLoadedChunkAndShouldTick; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/world/border_chunk_rendering/MixinBuiltChunk.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.world.border_chunk_rendering; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.client.render.chunk.ChunkBuilder; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Inject; 30 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 31 | 32 | @Mixin(ChunkBuilder.BuiltChunk.class) 33 | public abstract class MixinBuiltChunk { 34 | 35 | @Inject(method = "shouldBuild", at = @At("HEAD"), cancellable = true) 36 | private void modifyRenderCondition(CallbackInfoReturnable cir) { 37 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8)) { 38 | cir.setReturnValue(true); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/injection/mixin/features/world/remove_server_view_distance/MixinGameOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.injection.mixin.features.world.remove_server_view_distance; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.client.option.GameOptions; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 30 | 31 | @Mixin(GameOptions.class) 32 | public abstract class MixinGameOptions { 33 | 34 | @ModifyVariable(method = "setServerViewDistance", at = @At("HEAD"), ordinal = 0, argsOnly = true) 35 | private int changeServerViewDistance(int viewDistance) { 36 | if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_17_1)) { 37 | return 0; 38 | } else { 39 | return viewDistance; 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/command/VFPViaSubCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.command; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viafabricplus.util.ChatUtil; 26 | import com.viaversion.viaversion.api.command.ViaCommandSender; 27 | import com.viaversion.viaversion.api.command.ViaSubCommand; 28 | import com.viaversion.viaversion.api.connection.UserConnection; 29 | 30 | public interface VFPViaSubCommand extends ViaSubCommand { 31 | 32 | /** 33 | * Automatically prefix all messages 34 | */ 35 | default void sendMessage(final ViaCommandSender sender, final String message) { 36 | ViaSubCommand.super.sendMessage(sender, ChatUtil.PREFIX + " " + message); 37 | } 38 | 39 | default UserConnection getUser() { 40 | return ProtocolTranslator.getPlayNetworkUserConnection(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/platform/ViaFabricPlusViaLegacyPlatformImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.platform; 23 | 24 | import com.viaversion.vialoader.impl.platform.ViaLegacyPlatformImpl; 25 | import com.viaversion.viaversion.api.Via; 26 | 27 | public final class ViaFabricPlusViaLegacyPlatformImpl extends ViaLegacyPlatformImpl { 28 | 29 | @Override 30 | public String getCpeAppName() { 31 | return Via.getPlatform().getPlatformName() + " " + Via.getPlatform().getPlatformVersion(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/vialegacy/ViaFabricPlusClassicWorldHeightProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.vialegacy; 23 | 24 | import com.viaversion.viaversion.api.connection.UserConnection; 25 | import net.raphimc.vialegacy.protocol.classic.c0_28_30toa1_0_15.provider.ClassicWorldHeightProvider; 26 | 27 | public final class ViaFabricPlusClassicWorldHeightProvider extends ClassicWorldHeightProvider { 28 | 29 | @Override 30 | public short getMaxChunkSectionCount(UserConnection user) { 31 | return 64; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/vialegacy/ViaFabricPlusEncryptionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.vialegacy; 23 | 24 | import com.viaversion.viafabricplus.injection.access.base.IClientConnection; 25 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 26 | import com.viaversion.viaversion.api.connection.UserConnection; 27 | import net.raphimc.vialegacy.protocol.release.r1_6_4tor1_7_2_5.provider.EncryptionProvider; 28 | 29 | public final class ViaFabricPlusEncryptionProvider extends EncryptionProvider { 30 | 31 | @Override 32 | public void enableDecryption(UserConnection connection) { 33 | ((IClientConnection) connection.getChannel().attr(ProtocolTranslator.CLIENT_CONNECTION_ATTRIBUTE_KEY).get()).viaFabricPlus$setupPreNettyDecryption(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/viaversion/ViaFabricPlusAckSequenceProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion; 23 | 24 | import com.viaversion.viaversion.api.connection.UserConnection; 25 | import com.viaversion.viaversion.protocols.v1_18_2to1_19.provider.AckSequenceProvider; 26 | 27 | public final class ViaFabricPlusAckSequenceProvider extends AckSequenceProvider { 28 | 29 | @Override 30 | public void handleSequence(UserConnection connection, int sequence) { 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/viaversion/ViaFabricPlusBaseVersionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator; 25 | import com.viaversion.viaversion.api.connection.UserConnection; 26 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 27 | import com.viaversion.viaversion.protocol.version.BaseVersionProvider; 28 | 29 | public final class ViaFabricPlusBaseVersionProvider extends BaseVersionProvider { 30 | 31 | @Override 32 | public ProtocolVersion getClosestServerProtocol(UserConnection connection) throws Exception { 33 | if (connection.isClientSide()) { 34 | return ProtocolTranslator.getTargetVersion(connection.getChannel()); 35 | } else { 36 | return super.getClosestServerProtocol(connection); 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/viaversion/ViaFabricPlusHandItemProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion; 23 | 24 | import com.viaversion.viafabricplus.protocoltranslator.translator.ItemTranslator; 25 | import com.viaversion.viaversion.api.connection.UserConnection; 26 | import com.viaversion.viaversion.api.minecraft.item.Item; 27 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 28 | import com.viaversion.viaversion.protocols.v1_8to1_9.provider.HandItemProvider; 29 | import net.minecraft.item.ItemStack; 30 | 31 | public final class ViaFabricPlusHandItemProvider extends HandItemProvider { 32 | 33 | public static ItemStack lastUsedItem = null; 34 | 35 | @Override 36 | public Item getHandItem(UserConnection info) { 37 | if (lastUsedItem != null && !lastUsedItem.isEmpty()) { 38 | return ItemTranslator.mcToVia(lastUsedItem, ProtocolVersion.v1_8); 39 | } else { 40 | return null; 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/viaversion/ViaFabricPlusPlayerAbilitiesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion; 23 | 24 | import com.viaversion.viaversion.api.connection.UserConnection; 25 | import com.viaversion.viaversion.protocols.v1_15_2to1_16.provider.PlayerAbilitiesProvider; 26 | import net.minecraft.client.MinecraftClient; 27 | 28 | public final class ViaFabricPlusPlayerAbilitiesProvider extends PlayerAbilitiesProvider { 29 | 30 | @Override 31 | public float getFlyingSpeed(UserConnection connection) { 32 | return MinecraftClient.getInstance().player.getAbilities().getFlySpeed(); 33 | } 34 | 35 | @Override 36 | public float getWalkingSpeed(UserConnection connection) { 37 | return MinecraftClient.getInstance().player.getAbilities().getWalkSpeed(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/provider/viaversion/ViaFabricPlusPlayerLookTargetProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion; 23 | 24 | import com.viaversion.viaversion.api.connection.UserConnection; 25 | import com.viaversion.viaversion.api.minecraft.BlockPosition; 26 | import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.PlayerLookTargetProvider; 27 | import net.minecraft.client.MinecraftClient; 28 | import net.minecraft.util.hit.BlockHitResult; 29 | import net.minecraft.util.math.BlockPos; 30 | 31 | public final class ViaFabricPlusPlayerLookTargetProvider extends PlayerLookTargetProvider { 32 | 33 | @Override 34 | public BlockPosition getPlayerLookTarget(UserConnection info) { 35 | if (MinecraftClient.getInstance().crosshairTarget instanceof BlockHitResult blockHitResult) { 36 | final BlockPos pos = blockHitResult.getBlockPos(); 37 | return new BlockPosition(pos.getX(), pos.getY(), pos.getZ()); 38 | } else { 39 | return null; 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/viaversion/ViaFabricPlusVLInjector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.viaversion; 23 | 24 | import com.viaversion.vialoader.impl.viaversion.VLInjector; 25 | import com.viaversion.vialoader.netty.VLLegacyPipeline; 26 | 27 | public final class ViaFabricPlusVLInjector extends VLInjector { 28 | 29 | @Override 30 | public String getEncoderName() { 31 | return VLLegacyPipeline.VIA_ENCODER_NAME; 32 | } 33 | 34 | @Override 35 | public String getDecoderName() { 36 | return VLLegacyPipeline.VIA_DECODER_NAME; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/impl/viaversion/ViaFabricPlusVLViaConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.impl.viaversion; 23 | 24 | import com.viaversion.vialoader.impl.viaversion.VLViaConfig; 25 | 26 | import java.io.File; 27 | import java.util.logging.Logger; 28 | 29 | public final class ViaFabricPlusVLViaConfig extends VLViaConfig { 30 | 31 | public ViaFabricPlusVLViaConfig(File configFile, Logger logger) { 32 | super(configFile, logger); 33 | 34 | UNSUPPORTED.add("simulate-pt"); 35 | UNSUPPORTED.add("fix-1_21-placement-rotation"); 36 | } 37 | 38 | @Override 39 | public boolean isSimulatePlayerTick() { 40 | return false; 41 | } 42 | 43 | @Override 44 | public boolean fix1_21PlacementRotation() { 45 | return false; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/netty/NoReadFlowControlHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.netty; 23 | 24 | import io.netty.channel.ChannelHandlerContext; 25 | import io.netty.handler.flow.FlowControlHandler; 26 | 27 | public final class NoReadFlowControlHandler extends FlowControlHandler { 28 | 29 | @Override 30 | public void read(ChannelHandlerContext ctx) throws Exception { 31 | if (ctx.channel().config().isAutoRead()) { 32 | super.read(ctx); 33 | } 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/protocol/storage/BedrockJoinGameTracker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.protocol.storage; 23 | 24 | import com.viaversion.viaversion.api.connection.StorableObject; 25 | 26 | public final class BedrockJoinGameTracker implements StorableObject { 27 | 28 | private long seed; 29 | private String levelId; 30 | private long enchantmentSeed; 31 | 32 | public long getSeed() { 33 | return seed; 34 | } 35 | 36 | public void setSeed(long seed) { 37 | this.seed = seed; 38 | } 39 | 40 | public String getLevelId() { 41 | return levelId; 42 | } 43 | 44 | public void setLevelId(String levelId) { 45 | this.levelId = levelId; 46 | } 47 | 48 | public long getEnchantmentSeed() { 49 | return enchantmentSeed; 50 | } 51 | 52 | public void setEnchantmentSeed(long enchantmentSeed) { 53 | this.enchantmentSeed = enchantmentSeed; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/protocoltranslator/util/NoPacketSendChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.protocoltranslator.util; 23 | 24 | import io.netty.channel.local.LocalChannel; 25 | 26 | /** 27 | * This class can be used when creating dummy {@link com.viaversion.viaversion.api.connection.UserConnection} instances. 28 | * This class will prevent packets created by ViaVersion from being sent to the server. This is mainly used in the 29 | * translator system. See {@link com.viaversion.viafabricplus.protocoltranslator.translator} for more information. 30 | */ 31 | public final class NoPacketSendChannel extends LocalChannel { 32 | 33 | public static final NoPacketSendChannel INSTANCE = new NoPacketSendChannel(); 34 | 35 | private NoPacketSendChannel() { 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/util/MapUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.util; 23 | 24 | import java.util.LinkedHashMap; 25 | import java.util.Map; 26 | 27 | /** 28 | * Utility class for maps. 29 | */ 30 | public final class MapUtil { 31 | 32 | /** 33 | * Creates a new linked hash map with the given objects as key-value pairs. 34 | * 35 | * @param objects The objects to put into the map. Must be a multiple of 2. 36 | * @param The key type. 37 | * @param The value type. 38 | * @return The created map. 39 | */ 40 | public static Map linkedHashMap(final Object... objects) { 41 | if (objects.length % 2 != 0) { 42 | throw new IllegalArgumentException("Uneven object count"); 43 | } 44 | 45 | final Map map = new LinkedHashMap<>(); 46 | for (int i = 0; i < objects.length; i += 2) { 47 | map.put((K) objects[i], (V) objects[i + 1]); 48 | } 49 | return map; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/viaversion/viafabricplus/util/NotificationUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.util; 23 | 24 | import com.viaversion.viafabricplus.ViaFabricPlusImpl; 25 | import org.apache.logging.log4j.Logger; 26 | 27 | public final class NotificationUtil { 28 | 29 | public static void warnIncompatibilityPacket(final String version, final String packet, final String yarnMethod, final String mojmapMethod) { 30 | final Logger logger = ViaFabricPlusImpl.INSTANCE.getLogger(); 31 | logger.error("==========================================="); 32 | logger.error("The " + packet + " packet (>= " + version + ") could not be remapped without breaking content!"); 33 | logger.error("Try disabling mods one by one or using a binary search method to identify the problematic mod."); 34 | logger.error("Mods authors should use " + yarnMethod + " (Yarn) or " + mojmapMethod + " (Mojmap) instead of sending packets directly."); 35 | logger.error("Need help? Join our Discord: https://discord.gg/viaversion"); 36 | logger.error("==========================================="); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/data/armor-damages-b1.8.1.json: -------------------------------------------------------------------------------- 1 | { 2 | "minecraft:leather_helmet": 33, 3 | "minecraft:leather_chestplate": 48, 4 | "minecraft:leather_leggings": 45, 5 | "minecraft:leather_boots": 39, 6 | "minecraft:chainmail_helmet": 66, 7 | "minecraft:chainmail_chestplate": 96, 8 | "minecraft:chainmail_leggings": 90, 9 | "minecraft:chainmail_boots": 78, 10 | "minecraft:iron_helmet": 132, 11 | "minecraft:iron_chestplate": 192, 12 | "minecraft:iron_leggings": 180, 13 | "minecraft:iron_boots": 156, 14 | "minecraft:diamond_helmet": 264, 15 | "minecraft:diamond_chestplate": 384, 16 | "minecraft:diamond_leggings": 360, 17 | "minecraft:diamond_boots": 312, 18 | "minecraft:golden_helmet": 66, 19 | "minecraft:golden_chestplate": 96, 20 | "minecraft:golden_leggings": 90, 21 | "minecraft:golden_boots": 78 22 | } -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/data/item-identifiers-1.8.json: -------------------------------------------------------------------------------- 1 | { 2 | "minecraft:wooden_axe": 271, 3 | "minecraft:stone_axe": 275, 4 | "minecraft:iron_axe": 258, 5 | "minecraft:golden_axe": 286, 6 | "minecraft:diamond_axe": 279, 7 | "minecraft:wooden_pickaxe": 270, 8 | "minecraft:stone_pickaxe": 274, 9 | "minecraft:iron_pickaxe": 257, 10 | "minecraft:golden_pickaxe": 285, 11 | "minecraft:diamond_pickaxe": 278, 12 | "minecraft:wooden_shovel": 269, 13 | "minecraft:stone_shovel": 273, 14 | "minecraft:iron_shovel": 256, 15 | "minecraft:golden_shovel": 284, 16 | "minecraft:diamond_shovel": 277, 17 | "minecraft:wooden_sword": 268, 18 | "minecraft:stone_sword": 272, 19 | "minecraft:iron_sword": 267, 20 | "minecraft:golden_sword": 283, 21 | "minecraft:diamond_sword": 276, 22 | "minecraft:wooden_hoe": 290, 23 | "minecraft:stone_hoe": 291, 24 | "minecraft:iron_hoe": 292, 25 | "minecraft:golden_hoe": 294, 26 | "minecraft:diamond_hoe": 293, 27 | "minecraft:leather_boots": 301, 28 | "minecraft:leather_leggings": 300, 29 | "minecraft:leather_chestplate": 299, 30 | "minecraft:leather_helmet": 298, 31 | "minecraft:chainmail_boots": 305, 32 | "minecraft:chainmail_leggings": 304, 33 | "minecraft:chainmail_chestplate": 303, 34 | "minecraft:chainmail_helmet": 302, 35 | "minecraft:iron_boots": 309, 36 | "minecraft:iron_leggings": 308, 37 | "minecraft:iron_chestplate": 307, 38 | "minecraft:iron_helmet": 306, 39 | "minecraft:golden_boots": 317, 40 | "minecraft:golden_leggings": 316, 41 | "minecraft:golden_chestplate": 315, 42 | "minecraft:golden_helmet": 314, 43 | "minecraft:diamond_boots": 313, 44 | "minecraft:diamond_leggings": 312, 45 | "minecraft:diamond_chestplate": 311, 46 | "minecraft:diamond_helmet": 310 47 | } 48 | -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/src/main/resources/assets/viafabricplus/icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/particles/footstep.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": [ 3 | "viafabricplus:footprint" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/textures/boat1_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/src/main/resources/assets/viafabricplus/textures/boat1_8.png -------------------------------------------------------------------------------- /src/main/resources/assets/viafabricplus/textures/particle/footprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/src/main/resources/assets/viafabricplus/textures/particle/footprint.png -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "viafabricplus", 4 | "version": "${version}", 5 | "name": "ViaFabricPlus", 6 | "description": "${description}", 7 | "authors": [ 8 | { 9 | "name": "FlorianMichael/EnZaXD", 10 | "contact": { 11 | "email": "florian.michael07@gmail.com", 12 | "homepage": "https://github.com/FlorianMichael" 13 | } 14 | }, 15 | { 16 | "name": "RK_01", 17 | "contact": { 18 | "homepage": "https://github.com/RaphiMC" 19 | } 20 | } 21 | ], 22 | "contributors": [ 23 | "allinkdev", 24 | "lowercasebtw", 25 | { 26 | "name": "GitHub contributors", 27 | "contact": { 28 | "homepage": "https://github.com/ViaVersion/ViaFabricPlus/graphs/contributors" 29 | } 30 | } 31 | ], 32 | "contact": { 33 | "homepage": "https://florianmichael.de/", 34 | "sources": "https://github.com/ViaVersion/ViaFabricPlus", 35 | "issues": "https://github.com/ViaVersion/ViaFabricPlus/issues", 36 | "email": "florian.michael07@gmail.com" 37 | }, 38 | "license": "GPL-v3", 39 | "icon": "assets/viafabricplus/icon.png", 40 | "environment": "client", 41 | "entrypoints": { 42 | "modmenu": [ 43 | "com.viaversion.viafabricplus.base.ModMenuScreenFactory" 44 | ] 45 | }, 46 | "mixins": [ 47 | "viafabricplus.mixins.json" 48 | ], 49 | "accessWidener": "viafabricplus.accesswidener", 50 | "depends": { 51 | "fabric-resource-loader-v0": ">=0.11.14", 52 | "fabric-networking-api-v1": ">=3.1.1", 53 | "fabric-command-api-v2": ">=2.2.18", 54 | "fabric-lifecycle-events-v1": ">=2.2.28", 55 | "fabric-particles-v1": ">=1.1.6", 56 | "fabric-registry-sync-v0": ">=4.0.13", 57 | "minecraft": "${mcVersion}", 58 | "java": ">=21" 59 | }, 60 | "breaks": { 61 | "viafabric": "*" 62 | }, 63 | "custom": { 64 | "vfp:implVersion": "${implVersion}" 65 | }, 66 | "provides": [ 67 | "viaversion", 68 | "viabackwards" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /src/test/java/com/viaversion/viafabricplus/generator/impl/ResourcePackHeaderDiffGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.generator.impl; 23 | 24 | import com.viaversion.viafabricplus.generator.util.Generator; 25 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 26 | import net.minecraft.SharedConstants; 27 | 28 | import static com.viaversion.viafabricplus.generator.util.FieldUtil.getFieldName; 29 | 30 | public final class ResourcePackHeaderDiffGenerator implements Generator { 31 | 32 | @Override 33 | public StringBuilder generate(final ProtocolVersion nativeVersion) { 34 | final String fieldName = getFieldName(ProtocolVersion.class, nativeVersion); 35 | final StringBuilder output = new StringBuilder(); 36 | output.append("registerVersion(ProtocolVersion.") 37 | .append(fieldName) 38 | .append(", ") 39 | .append(SharedConstants.RESOURCE_PACK_VERSION) 40 | .append(", \"") 41 | .append(SharedConstants.getGameVersion().getName()) 42 | .append("\");"); 43 | return output; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /viafabricplus-api/gradle.properties: -------------------------------------------------------------------------------- 1 | project_description=Interface for third-party mods to interact with ViaFabricPlus internals. 2 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/java/com/viaversion/viafabricplus/ViaFabricPlus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus; 23 | 24 | import com.viaversion.viafabricplus.api.ViaFabricPlusBase; 25 | import org.jetbrains.annotations.ApiStatus; 26 | 27 | /** 28 | * Holder class for the {@link ViaFabricPlusBase} implementation 29 | */ 30 | public final class ViaFabricPlus { 31 | 32 | private static ViaFabricPlusBase impl; 33 | 34 | @ApiStatus.Internal 35 | public static void init(final ViaFabricPlusBase impl) { 36 | if (ViaFabricPlus.impl != null) { 37 | throw new IllegalStateException("ViaFabricPlus has already been initialized!"); 38 | } 39 | ViaFabricPlus.impl = impl; 40 | } 41 | 42 | /** 43 | * @return the ViaFabricPlusBase implementation which is set by the internals 44 | */ 45 | public static ViaFabricPlusBase getImpl() { 46 | if (impl == null) { 47 | throw new IllegalStateException("ViaFabricPlus has not been initialized yet!"); 48 | } 49 | return impl; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/java/com/viaversion/viafabricplus/api/entrypoint/ViaFabricPlusLoadEntrypoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.api.entrypoint; 23 | 24 | import com.viaversion.viafabricplus.api.ViaFabricPlusBase; 25 | import com.viaversion.viafabricplus.api.events.LoadingCycleCallback; 26 | 27 | /** 28 | * Optional Entrypoint called before the ViaFabricPlus loading cycle starts. This is needed to register a {@link LoadingCycleCallback} callback. 29 | *

30 | * See {@link LoadingCycleCallback} for more information. 31 | */ 32 | @FunctionalInterface 33 | public interface ViaFabricPlusLoadEntrypoint { 34 | 35 | String KEY = "viafabricplus"; 36 | 37 | void onPlatformLoad(final ViaFabricPlusBase platform); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/java/com/viaversion/viafabricplus/api/events/ChangeProtocolVersionCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.api.events; 23 | 24 | import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; 25 | 26 | /** 27 | * This event is fired when the user changes the target version in the screen, or if the user joins a server with a different version. 28 | * If the user disconnects, the event will also be fired with the current version. 29 | */ 30 | public interface ChangeProtocolVersionCallback { 31 | 32 | void onChangeProtocolVersion(final ProtocolVersion oldVersion, final ProtocolVersion newVersion); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/java/com/viaversion/viafabricplus/api/settings/type/BooleanSetting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.api.settings.type; 23 | 24 | import com.google.gson.JsonObject; 25 | import com.viaversion.viafabricplus.api.settings.AbstractSetting; 26 | import com.viaversion.viafabricplus.api.settings.SettingGroup; 27 | import net.minecraft.text.MutableText; 28 | 29 | public class BooleanSetting extends AbstractSetting { 30 | 31 | public BooleanSetting(SettingGroup parent, MutableText name, Boolean defaultValue) { 32 | super(parent, name, defaultValue); 33 | } 34 | 35 | @Override 36 | public void write(JsonObject object) { 37 | object.addProperty(getTranslationKey(), getValue()); 38 | } 39 | 40 | @Override 41 | public void read(JsonObject object) { 42 | setValue(object.get(getTranslationKey()).getAsBoolean()); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/java/com/viaversion/viafabricplus/api/settings/type/ButtonSetting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.api.settings.type; 23 | 24 | import com.google.gson.JsonObject; 25 | import com.viaversion.viafabricplus.api.settings.AbstractSetting; 26 | import com.viaversion.viafabricplus.api.settings.SettingGroup; 27 | import net.minecraft.text.MutableText; 28 | 29 | public class ButtonSetting extends AbstractSetting { 30 | 31 | public ButtonSetting(SettingGroup parent, MutableText name, Runnable onClick) { 32 | super(parent, name, onClick); 33 | } 34 | 35 | 36 | public MutableText displayValue() { 37 | return getName(); 38 | } 39 | 40 | @Override 41 | public void write(JsonObject object) { 42 | } 43 | 44 | @Override 45 | public void read(JsonObject object) { 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /viafabricplus-api/src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "viafabricplus-api", 4 | "version": "${version}", 5 | "name": "ViaFabricPlus API", 6 | "description": "${description}", 7 | "authors": [ 8 | { 9 | "name": "FlorianMichael/EnZaXD", 10 | "contact": { 11 | "email": "florian.michael07@gmail.com", 12 | "homepage": "https://github.com/FlorianMichael" 13 | } 14 | }, 15 | { 16 | "name": "RK_01", 17 | "contact": { 18 | "homepage": "https://github.com/RaphiMC" 19 | } 20 | } 21 | ], 22 | "contributors": [ 23 | "allinkdev", 24 | "lowercasebtw", 25 | { 26 | "name": "GitHub contributors", 27 | "contact": { 28 | "homepage": "https://github.com/ViaVersion/ViaFabricPlus/graphs/contributors" 29 | } 30 | } 31 | ], 32 | "contact": { 33 | "homepage": "https://florianmichael.de/", 34 | "sources": "https://github.com/ViaVersion/ViaFabricPlus", 35 | "issues": "https://github.com/ViaVersion/ViaFabricPlus/issues", 36 | "email": "florian.michael07@gmail.com" 37 | }, 38 | "license": "GPL-v3", 39 | "environment": "client", 40 | "depends": { 41 | "viafabricplus": ">=4.1.4" 42 | }, 43 | "custom": { 44 | "modmenu": { 45 | "parent": "viafabricplus" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /viafabricplus-visuals/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.florianmichael.baseproject.* 2 | 3 | dependencies { 4 | loadFabricApiModules("fabric-lifecycle-events-v1") 5 | compileOnly(project(":viafabricplus-api")) 6 | } 7 | -------------------------------------------------------------------------------- /viafabricplus-visuals/gradle.properties: -------------------------------------------------------------------------------- 1 | project_description=Additional mod for ViaFabricPlus to add visual-only changes. 2 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/features/force_unicode_font/LanguageUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.features.force_unicode_font; 23 | 24 | import java.util.Map; 25 | 26 | public final class LanguageUtil { 27 | 28 | private static final int NON_ASCII_THRESHOLD = 256; 29 | 30 | public static boolean isUnicodeFont1_12_2(final Map translations) { 31 | int nonAsciiCharacters = 0; 32 | int totalCharacters = 0; 33 | 34 | for (String value : translations.values()) { 35 | totalCharacters += value.length(); 36 | for (int i = 0; i < value.length(); ++i) { 37 | if (value.charAt(i) >= NON_ASCII_THRESHOLD) { 38 | nonAsciiCharacters++; 39 | } 40 | } 41 | } 42 | 43 | return (float) nonAsciiCharacters / totalCharacters > 0.1; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/features/r1_7_tab_list_style/LegacyTabList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.features.r1_7_tab_list_style; 23 | 24 | public final class LegacyTabList { 25 | 26 | /** 27 | * An incremental index used for tablist entries to implement FIFO behavior in Minecraft versions up to 1.7. 28 | */ 29 | public static int globalTablistIndex = 0; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/access/r1_7_tab_list_tyle/IPlayerListEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.access.r1_7_tab_list_tyle; 23 | 24 | public interface IPlayerListEntry { 25 | 26 | int viaFabricPlusVisuals$getIndex(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/access/r1_7_tab_list_tyle/IPlayerListHud.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.access.r1_7_tab_list_tyle; 23 | 24 | public interface IPlayerListHud { 25 | 26 | void viaFabricPlusVisuals$setMaxPlayers(final int maxPlayers); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/force_unicode_font/MixinLanguageManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.force_unicode_font; 23 | 24 | import com.viaversion.viafabricplus.ViaFabricPlus; 25 | import com.viaversion.viafabricplus.visuals.features.force_unicode_font.UnicodeFontFix1_12_2; 26 | import net.minecraft.client.resource.language.LanguageManager; 27 | import net.minecraft.resource.ResourceManager; 28 | import org.spongepowered.asm.mixin.Mixin; 29 | import org.spongepowered.asm.mixin.injection.At; 30 | import org.spongepowered.asm.mixin.injection.Inject; 31 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 32 | 33 | @Mixin(LanguageManager.class) 34 | public abstract class MixinLanguageManager { 35 | 36 | @Inject(method = "reload", at = @At("RETURN")) 37 | private void updateUnicodeFontOverride(ResourceManager manager, CallbackInfo ci) { 38 | UnicodeFontFix1_12_2.updateUnicodeFontOverride(ViaFabricPlus.getImpl().getTargetVersion()); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/hud_element_changes/MixinChatHud.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.hud_element_changes; 23 | 24 | import com.viaversion.viafabricplus.visuals.settings.VisualSettings; 25 | import net.minecraft.client.gui.hud.ChatHud; 26 | import net.minecraft.client.gui.hud.MessageIndicator; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 30 | 31 | @Mixin(ChatHud.class) 32 | public abstract class MixinChatHud { 33 | 34 | @ModifyVariable(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)V", at = @At("HEAD"), ordinal = 0, argsOnly = true) 35 | private MessageIndicator removeIndicator(MessageIndicator instance) { 36 | return VisualSettings.INSTANCE.hideSignatureIndicator.isEnabled() ? null : instance; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/hud_element_changes/MixinClientPlayerInteractionManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.hud_element_changes; 23 | 24 | import com.viaversion.viafabricplus.visuals.settings.VisualSettings; 25 | import net.minecraft.client.network.ClientPlayerInteractionManager; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.injection.At; 28 | import org.spongepowered.asm.mixin.injection.Inject; 29 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 30 | 31 | @Mixin(ClientPlayerInteractionManager.class) 32 | public abstract class MixinClientPlayerInteractionManager { 33 | 34 | @Inject(method = "hasExperienceBar", at = @At("HEAD"), cancellable = true) 35 | private void removeExperienceBar(CallbackInfoReturnable cir) { 36 | if (VisualSettings.INSTANCE.hideModernHUDElements.isEnabled()) { 37 | cir.setReturnValue(false); 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/player_rotations/MixinBipedEntityModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.player_rotations; 23 | 24 | import com.viaversion.viafabricplus.visuals.settings.VisualSettings; 25 | import net.minecraft.client.render.entity.model.BipedEntityModel; 26 | import net.minecraft.util.math.MathHelper; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Redirect; 30 | 31 | @Mixin(BipedEntityModel.class) 32 | public abstract class MixinBipedEntityModel { 33 | 34 | @Redirect(method = "positionBlockingArm", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;clamp(FFF)F")) 35 | private float preventArmFollowingThirdPersonRotation(float value, float min, float max) { 36 | if (VisualSettings.INSTANCE.lockBlockingArmRotation.isEnabled()) { 37 | return 0.0F; 38 | } else { 39 | return MathHelper.clamp(value, min, max); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/potion_glint/MixinPotionItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.potion_glint; 23 | 24 | import com.viaversion.viafabricplus.visuals.settings.VisualSettings; 25 | import net.minecraft.component.DataComponentTypes; 26 | import net.minecraft.component.type.PotionContentsComponent; 27 | import net.minecraft.item.Item; 28 | import net.minecraft.item.ItemStack; 29 | import net.minecraft.item.PotionItem; 30 | import org.spongepowered.asm.mixin.Mixin; 31 | 32 | @Mixin(PotionItem.class) 33 | public abstract class MixinPotionItem extends Item { 34 | 35 | public MixinPotionItem(final Settings settings) { 36 | super(settings); 37 | } 38 | 39 | @Override 40 | public boolean hasGlint(final ItemStack stack) { 41 | if (VisualSettings.INSTANCE.potionEnchantmentGlint.isEnabled()) { 42 | return stack.getOrDefault(DataComponentTypes.POTION_CONTENTS, PotionContentsComponent.DEFAULT).hasEffects(); 43 | } else { 44 | return super.hasGlint(stack); 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/r1_7_tab_list_style/MixinPlayerListEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.r1_7_tab_list_style; 23 | 24 | import com.viaversion.viafabricplus.visuals.features.r1_7_tab_list_style.LegacyTabList; 25 | import com.viaversion.viafabricplus.visuals.injection.access.r1_7_tab_list_tyle.IPlayerListEntry; 26 | import net.minecraft.client.network.PlayerListEntry; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | import org.spongepowered.asm.mixin.Unique; 29 | 30 | @Mixin(PlayerListEntry.class) 31 | public abstract class MixinPlayerListEntry implements IPlayerListEntry { 32 | 33 | @Unique 34 | private final int viaFabricPlusVisuals$index = LegacyTabList.globalTablistIndex++; 35 | 36 | @Override 37 | public int viaFabricPlusVisuals$getIndex() { 38 | return viaFabricPlusVisuals$index; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/java/com/viaversion/viafabricplus/visuals/injection/mixin/secure_chat_warning/MixinClientPlayNetworkHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of ViaFabricPlus - https://github.com/ViaVersion/ViaFabricPlus 3 | * Copyright (C) 2021-2025 the original authors 4 | * - FlorianMichael/EnZaXD 5 | * - RK_01/RaphiMC 6 | * Copyright (C) 2023-2025 ViaVersion and contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | package com.viaversion.viafabricplus.visuals.injection.mixin.secure_chat_warning; 23 | 24 | import com.viaversion.viafabricplus.visuals.settings.VisualSettings; 25 | import net.minecraft.client.network.ClientPlayNetworkHandler; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.Shadow; 28 | import org.spongepowered.asm.mixin.injection.At; 29 | import org.spongepowered.asm.mixin.injection.Redirect; 30 | 31 | @Mixin(ClientPlayNetworkHandler.class) 32 | public abstract class MixinClientPlayNetworkHandler { 33 | 34 | @Shadow 35 | protected abstract boolean isSecureChatEnforced(); 36 | 37 | @Redirect(method = "onGameJoin", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;isSecureChatEnforced()Z")) 38 | private boolean removeSecureChatWarning(ClientPlayNetworkHandler instance) { 39 | return isSecureChatEnforced() || VisualSettings.INSTANCE.disableSecureChatWarning.isEnabled(); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/resources/assets/viafabricplus-visuals/sounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "oof.hurt": { 3 | "sounds": [ 4 | "viafabricplus-visuals:oof_hurt" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/resources/assets/viafabricplus-visuals/sounds/oof_hurt.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ViaVersion/ViaFabricPlus/7352f1bc85873cf943278ced131251ae74387c2c/viafabricplus-visuals/src/main/resources/assets/viafabricplus-visuals/sounds/oof_hurt.ogg -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "viafabricplus-visuals", 4 | "version": "${version}", 5 | "name": "ViaFabricPlus Visuals", 6 | "description": "${description}", 7 | "authors": [ 8 | { 9 | "name": "FlorianMichael/EnZaXD", 10 | "contact": { 11 | "email": "florian.michael07@gmail.com", 12 | "homepage": "https://github.com/FlorianMichael" 13 | } 14 | }, 15 | { 16 | "name": "RK_01", 17 | "contact": { 18 | "homepage": "https://github.com/RaphiMC" 19 | } 20 | } 21 | ], 22 | "contributors": [ 23 | "allinkdev", 24 | "lowercasebtw", 25 | { 26 | "name": "GitHub contributors", 27 | "contact": { 28 | "homepage": "https://github.com/ViaVersion/ViaFabricPlus/graphs/contributors" 29 | } 30 | } 31 | ], 32 | "contact": { 33 | "homepage": "https://florianmichael.de/", 34 | "sources": "https://github.com/ViaVersion/ViaFabricPlus", 35 | "issues": "https://github.com/ViaVersion/ViaFabricPlus/issues", 36 | "email": "florian.michael07@gmail.com" 37 | }, 38 | "license": "GPL-v3", 39 | "environment": "client", 40 | "entrypoints": { 41 | "viafabricplus": [ 42 | "com.viaversion.viafabricplus.visuals.ViaFabricPlusVisuals" 43 | ] 44 | }, 45 | "mixins": [ 46 | "viafabricplus-visuals.mixins.json" 47 | ], 48 | "accessWidener": "viafabricplus-visuals.accesswidener", 49 | "depends": { 50 | "viafabricplus": ">=4.1.4" 51 | }, 52 | "custom": { 53 | "modmenu": { 54 | "parent": "viafabricplus" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/resources/viafabricplus-visuals.accesswidener: -------------------------------------------------------------------------------- 1 | accessWidener v1 named 2 | 3 | accessible field net/minecraft/client/resource/language/TranslationStorage translations Ljava/util/Map; 4 | accessible field net/minecraft/client/gui/screen/multiplayer/SocialInteractionsScreen TITLE Lnet/minecraft/text/Text; 5 | accessible field net/minecraft/client/gui/widget/TexturedButtonWidget textures Lnet/minecraft/client/gui/screen/ButtonTextures; 6 | accessible field net/minecraft/client/font/FontStorage$GlyphPair MISSING Lnet/minecraft/client/font/FontStorage$GlyphPair; 7 | 8 | accessible method net/minecraft/client/font/FontStorage$GlyphPair (Lnet/minecraft/client/font/Glyph;Lnet/minecraft/client/font/Glyph;)V 9 | 10 | accessible class net/minecraft/client/gui/screen/GameModeSwitcherScreen$GameModeSelection 11 | accessible class net/minecraft/client/font/TextRenderer$Drawer 12 | accessible class net/minecraft/client/font/FontStorage$GlyphPair 13 | -------------------------------------------------------------------------------- /viafabricplus-visuals/src/main/resources/viafabricplus-visuals.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "com.viaversion.viafabricplus.visuals.injection.mixin", 5 | "compatibilityLevel": "JAVA_21", 6 | "client": [ 7 | "classic.creative_menu.MixinCreativeInventoryScreen", 8 | "classic.walking_animation.MixinBipedEntityModel", 9 | "downloading_terrain_transitions.MixinDownloadingTerrainScreen", 10 | "filter_game_mode_selections.MixinGameModeSwitcherScreen", 11 | "filter_game_mode_selections.MixinGameModeSwitcherScreen_GameModeSelection", 12 | "force_unicode_font.MixinLanguageManager", 13 | "hud_element_changes.MixinChatHud", 14 | "hud_element_changes.MixinChatScreen", 15 | "hud_element_changes.MixinClientPlayerInteractionManager", 16 | "hud_element_changes.MixinInGameHud", 17 | "instant_sneaking.MixinCamera", 18 | "oof_sound.MixinPlayerEntity", 19 | "petrified_oak_slab_model.MixinItemRenderer", 20 | "player_rotations.MixinBipedEntityModel", 21 | "player_rotations.MixinLivingEntity", 22 | "potion_glint.MixinPotionItem", 23 | "r1_7_item_tilt.MixinHeldItemRenderer", 24 | "r1_7_tab_list_style.MixinClientPlayNetworkHandler", 25 | "r1_7_tab_list_style.MixinPlayerListEntry", 26 | "r1_7_tab_list_style.MixinPlayerListHud", 27 | "remove_newer_screen_features.MixinGameMenuScreen", 28 | "remove_newer_screen_features.MixinScreen", 29 | "secure_chat_warning.MixinClientPlayNetworkHandler", 30 | "strike_through_offset.MixinTextRenderer_Drawer", 31 | "villager_profession.MixinVillagerClothingFeatureRenderer" 32 | ], 33 | "injectors": { 34 | "defaultRequire": 1 35 | }, 36 | "overwrites": { 37 | "requireAnnotations": true 38 | } 39 | } 40 | --------------------------------------------------------------------------------