From ae11eca50358fa80621cef8050cc0eb2f0479a09 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 07:17:49 +0000 Subject: [PATCH 1/2] Reduce the 1.7 tab to a single 1.7 Animations mod The 1.7 features now live as one mod tile under Mods, with only the groups that are still wanted: blocking/item using, items (sprite rendering and item positions included), offsets/eye height, and sneaking. Every other 1.7 group is gone along with the code, mixins, assets and translations behind it, so the menu is down to three tabs: HUD, Mods and Settings. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01S3hUZRU7sMz9P9Uzub4xrU --- .../assets/dolphinclient/lang/en_us.json | 1 - .../axolotlclient/config/ui/MenuCatalog.java | 14 +- .../modules/hud/HudEditScreen.java | 2 +- .../modules/hud/ModsMenuIcons.java | 16 +- .../config/OldAnimationsConfig.java | 342 +++--------------- .../mixin/AmbientOcclusionFaceMixin.java | 44 --- .../oldanimations/mixin/BlockMixin.java | 55 --- .../mixin/BlockModelAccessor.java | 54 --- .../mixin/BlockModelRendererMixin.java | 61 ---- .../mixin/BlockModelShaperMixin.java | 59 --- .../mixin/ChatOptionsScreenMixin.java | 131 ------- .../mixin/ClientPlayNetworkHandlerMixin.java | 104 ------ .../oldanimations/mixin/ClientWorldMixin.java | 64 ---- .../oldanimations/mixin/CrashReportMixin.java | 43 --- .../mixin/DifficultyCommandMixin.java | 43 --- .../mixin/DimensionAccessor.java | 31 -- .../oldanimations/mixin/DoorBlockMixin.java | 37 -- .../oldanimations/mixin/EggEntityMixin.java | 43 --- .../mixin/EntityRenderDispatcherMixin.java | 61 +--- .../mixin/EntityRendererMixin.java | 26 -- .../mixin/FenceGateBlockMixin.java | 68 ---- .../mixin/FireChargeItemMixin.java | 42 --- .../mixin/FurnaceMinecartEntityMixin.java | 39 -- .../mixin/GameRendererMixin.java | 70 ---- .../mixin/HumanoidSkullModelMixin.java | 57 --- .../mixin/IntegratedServerMixin.java | 69 ---- .../mixin/ItemEntityRendererMixin.java | 35 -- .../mixin/ItemModelGeneratorMixin.java | 122 ------- .../mixin/ItemModelShaperMixin.java | 57 +-- .../mixin/ItemRendererMixin.java | 195 +--------- .../mixin/LivingEntityMixin.java | 79 ---- .../mixin/LivingEntityRendererAccessor.java | 34 -- .../mixin/LivingEntityRendererMixin.java | 140 +------ .../oldanimations/mixin/MinecraftMixin.java | 94 ----- .../oldanimations/mixin/MobRendererMixin.java | 51 --- .../oldanimations/mixin/ModelBakeryMixin.java | 318 +--------------- .../mixin/PrimedTntRendererMixin.java | 46 --- .../mixin/ServerPlayerEntityMixin.java | 55 --- .../oldanimations/mixin/SnooperMixin.java | 38 -- .../mixin/TextureAtlasMixin.java | 48 --- .../mixin/TextureAtlasSpriteMixin.java | 76 ---- .../mixin/TrapdoorBlockMixin.java | 37 -- .../mixin/WitherChargeLayerMixin.java | 41 --- .../oldanimations/mixin/WorldMixin.java | 56 --- .../mixin/WorldRendererMixin.java | 58 --- .../oldanimations/mixin/gui/ChatGuiMixin.java | 42 --- .../mixin/gui/DebugOverlayMixin.java | 110 ------ .../mixin/gui/DisconnectedScreenMixin.java | 68 ---- .../oldanimations/mixin/gui/GameGuiMixin.java | 84 ----- .../mixin/gui/GameMenuScreenMixin.java | 41 --- .../mixin/gui/GuiElementMixin.java | 41 --- .../mixin/gui/InventoryMenuScreenMixin.java | 73 ---- .../mixin/gui/KeyBindingEntryMixin.java | 69 ---- .../mixin/gui/KeyBindingMixin.java | 45 --- .../mixin/gui/ListWidgetMixin.java | 72 ---- .../mixin/gui/OptionsScreenMixin.java | 125 ------- .../mixin/gui/PlayerInventoryScreenMixin.java | 42 --- .../mixin/gui/PlayerTabOverlayMixin.java | 246 ------------- .../mixin/gui/PresetsScreenMixin.java | 50 --- .../mixin/gui/ResourcePackEntryMixin.java | 39 -- .../mixin/gui/ResourcePackScreenMixin.java | 46 --- .../mixin/gui/ServerListEntryWidgetMixin.java | 57 --- .../gui/SurvivalInventoryScreenMixin.java | 40 -- .../mixin/gui/VideoOptionsScreenMixin.java | 40 -- .../mob_layers/AbstractArmorLayerMixin.java | 78 ---- .../mob_layers/EnderDragonEyesLayerMixin.java | 52 --- .../mob_layers/EndermanEyesLayerMixin.java | 61 ---- .../mixin/mob_layers/PigSaddleLayerMixin.java | 66 ---- .../mixin/mob_layers/SheepFurLayerMixin.java | 57 --- .../mob_layers/SlimeOuterLayerMixin.java | 57 --- .../mob_layers/SpiderEyesLayerMixin.java | 61 ---- .../mob_layers/WolfCollarLayerMixin.java | 52 --- .../mixin/mob_layers/WornSkullLayerMixin.java | 9 - .../util/CustomTextureAtlasSprite.java | 40 -- .../oldanimations/util/DamageTint.java | 47 --- .../oldanimations/util/DebugComponents.java | 122 ------- .../oldanimations/util/GlintHandler.java | 40 -- .../oldanimations/util/GlintQuadModel.java | 91 ----- .../oldanimations/util/HashedModel.java | 91 ----- .../oldanimations/util/IDamageTint.java | 27 -- .../oldanimations/util/MobUtil.java | 79 ---- .../oldanimations/util/OldButtonWidget.java | 58 --- .../util/OpaqueLeavesHandler.java | 46 --- .../oldanimations/util/SoundUtil.java | 26 -- .../util/ducks/ILivingEntity.java | 25 -- .../lang/en_us.json | 177 +-------- .../blockstates/acacia_leaves_opaque.json | 5 - .../blockstates/birch_leaves_opaque.json | 5 - .../blockstates/dark_oak_leaves_opaque.json | 5 - .../blockstates/jungle_leaves_opaque.json | 5 - .../blockstates/oak_leaves_opaque.json | 5 - .../blockstates/spruce_leaves_opaque.json | 5 - .../block/acacia_fence_gate_inventory.json | 6 - .../models/block/acacia_leaves_opaque.json | 6 - .../block/birch_fence_gate_inventory.json | 6 - .../models/block/birch_leaves_opaque.json | 6 - .../block/dark_oak_fence_gate_inventory.json | 6 - .../models/block/dark_oak_leaves_opaque.json | 6 - .../minecraft/models/block/fast_grass.json | 22 -- .../models/block/fence_gate_inventory.json | 43 --- .../block/jungle_fence_gate_inventory.json | 6 - .../models/block/jungle_leaves_opaque.json | 6 - .../block/oak_fence_gate_inventory.json | 6 - .../models/block/oak_leaves_opaque.json | 6 - .../block/spruce_fence_gate_inventory.json | 6 - .../models/block/spruce_leaves_opaque.json | 6 - .../models/item/acacia_leaves_opaque.json | 10 - .../models/item/birch_leaves_opaque.json | 10 - .../models/item/dark_oak_leaves_opaque.json | 10 - .../minecraft/models/item/fast_grass.json | 10 - .../assets/minecraft/models/item/fire.json | 18 - .../minecraft/models/item/flowing_lava.json | 18 - .../minecraft/models/item/flowing_water.json | 18 - .../models/item/jungle_leaves_opaque.json | 10 - .../assets/minecraft/models/item/lava.json | 18 - .../models/item/oak_leaves_opaque.json | 10 - .../minecraft/models/item/old_skull_char.json | 19 - .../models/item/old_skull_creeper.json | 19 - .../models/item/old_skull_skeleton.json | 19 - .../models/item/old_skull_wither.json | 19 - .../models/item/old_skull_zombie.json | 19 - .../models/item/spruce_leaves_opaque.json | 10 - .../assets/minecraft/models/item/water.json | 18 - .../textures/blocks/leaves_acacia_opaque.png | Bin 506 -> 0 bytes .../textures/blocks/leaves_big_oak_opaque.png | Bin 506 -> 0 bytes .../textures/blocks/leaves_birch_opaque.png | Bin 506 -> 0 bytes .../textures/blocks/leaves_jungle_opaque.png | Bin 349 -> 0 bytes .../textures/blocks/leaves_oak_opaque.png | Bin 506 -> 0 bytes .../textures/blocks/leaves_spruce_opaque.png | Bin 237 -> 0 bytes .../textures/items/skull_creeper.png | Bin 344 -> 0 bytes .../textures/items/skull_skeleton.png | Bin 258 -> 0 bytes .../minecraft/textures/items/skull_steve.png | Bin 317 -> 0 bytes .../minecraft/textures/items/skull_wither.png | Bin 278 -> 0 bytes .../minecraft/textures/items/skull_zombie.png | Bin 319 -> 0 bytes .../main/resources/axolotlclient.classtweaker | 2 - .../main/resources/oldanimations.mixins.json | 63 +--- 136 files changed, 76 insertions(+), 6259 deletions(-) delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/AmbientOcclusionFaceMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelAccessor.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelRendererMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelShaperMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ChatOptionsScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientWorldMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/CrashReportMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DifficultyCommandMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DimensionAccessor.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DoorBlockMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EggEntityMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FenceGateBlockMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FireChargeItemMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FurnaceMinecartEntityMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/HumanoidSkullModelMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/IntegratedServerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelGeneratorMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererAccessor.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MobRendererMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/PrimedTntRendererMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ServerPlayerEntityMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/SnooperMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasSpriteMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TrapdoorBlockMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WitherChargeLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldRendererMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ChatGuiMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DebugOverlayMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DisconnectedScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameGuiMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameMenuScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GuiElementMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/InventoryMenuScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingEntryMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ListWidgetMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/OptionsScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerInventoryScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerTabOverlayMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PresetsScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackEntryMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ServerListEntryWidgetMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/SurvivalInventoryScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/VideoOptionsScreenMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/AbstractArmorLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EnderDragonEyesLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EndermanEyesLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/PigSaddleLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SheepFurLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SlimeOuterLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SpiderEyesLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WolfCollarLayerMixin.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/CustomTextureAtlasSprite.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DamageTint.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DebugComponents.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintHandler.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintQuadModel.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/HashedModel.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/IDamageTint.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/MobUtil.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OldButtonWidget.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OpaqueLeavesHandler.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/SoundUtil.java delete mode 100644 versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/ducks/ILivingEntity.java delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/acacia_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/birch_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/dark_oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/jungle_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/blockstates/spruce_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/fast_grass.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_fence_gate_inventory.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/acacia_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/birch_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/dark_oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/fast_grass.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/fire.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_lava.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_water.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/jungle_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/lava.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/oak_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_char.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_creeper.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_skeleton.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_wither.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_zombie.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/spruce_leaves_opaque.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/models/item/water.json delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_acacia_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_big_oak_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_birch_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_jungle_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_oak_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_spruce_opaque.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_creeper.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_skeleton.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_steve.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_wither.png delete mode 100644 versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_zombie.png diff --git a/common/src/main/resources/assets/dolphinclient/lang/en_us.json b/common/src/main/resources/assets/dolphinclient/lang/en_us.json index de232c699..0197bf5db 100644 --- a/common/src/main/resources/assets/dolphinclient/lang/en_us.json +++ b/common/src/main/resources/assets/dolphinclient/lang/en_us.json @@ -252,7 +252,6 @@ "menu.client.search": "Search...", "menu.client.tab.hud": "HUD", "menu.client.tab.mods": "Mods", - "menu.client.tab.animations": "1.7", "menu.client.tab.settings": "Settings", "menu.client.edit": "Edit", "menu.client.expand": ">", diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java index 44d0ab991..7dde4defa 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java @@ -48,7 +48,6 @@ public final class MenuCatalog { public enum Tab { HUD, MODS, - ANIMATIONS, SETTINGS } @@ -150,7 +149,8 @@ public static List build() { continue; } if (OldAnimations.MODID.equals(name)) { - absorbAnimations(modules, category); + /* the 1.7 features are one mod tile with its groups as inline sections */ + modules.add(moduleFrom(name, Tab.MODS, null, nodesFrom(category, false))); continue; } Tab tab = isSettings(name) ? Tab.SETTINGS : Tab.MODS; @@ -161,16 +161,6 @@ public static List build() { return modules; } - /** - * The 1.7 tab lists the feature groups directly. The parent category and - * Misc grab bag are gone, so only the remaining configurable groups appear. - */ - private static void absorbAnimations(List modules, OptionCategory category) { - for (OptionCategory child : category.getSubCategories()) { - modules.add(moduleFrom(child.getName(), Tab.ANIMATIONS, firstEnabled(child.getOptions()), nodesFrom(child, false))); - } - } - private static void absorb(List modules, OptionCategory category, Tab tab) { Collection children = category.getSubCategories(); if (shouldPromote(children, tab)) { diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/HudEditScreen.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/HudEditScreen.java index 17c852316..70546a4a1 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/HudEditScreen.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/HudEditScreen.java @@ -92,7 +92,7 @@ public class HudEditScreen extends Screen { private int listScroll; private int mouseX, mouseY; private int caretTicks; - private static final int TAB_COLS = 4; + private static final int TAB_COLS = 3; private HudEntry current; private DrawPosition offset; diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/ModsMenuIcons.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/ModsMenuIcons.java index 730493654..621ba96a1 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/ModsMenuIcons.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/modules/hud/ModsMenuIcons.java @@ -105,21 +105,7 @@ final class ModsMenuIcons { put("bedwars", Items.BED); put("titles", Items.SIGN); - put("blockingItemUsing", Items.IRON_SWORD); - put("sneaking", Items.IRON_BOOTS); - put("items", Items.DIAMOND); - put("spriteRendering", Items.PAINTING); - put("itemPositions", Items.STICK); - put("resources", Items.BOOK); - put("models", Items.ARMOR_STAND); - put("textures", Item.byBlock(Blocks.WOOL)); - put("sounds", Items.RECORD_13); - put("combat", Items.DIAMOND_SWORD); - put("gui", Items.SIGN); - put("debugOverlay", Items.COMPASS); - put("enchantmentGlint", Items.EXPERIENCE_BOTTLE); - put("hitbox", Items.SLIME_BALL); - put("offsets", Items.COMPASS); + put("axolotlclient-oldanimations", Items.IRON_SWORD); } private ModsMenuIcons() { diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java index a68215b18..0843868ad 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java @@ -18,8 +18,6 @@ package io.github.axolotlclient.oldanimations.config; -import java.util.function.BooleanSupplier; - import io.github.axolotlclient.AxolotlClientConfig.api.AxolotlClientConfig; import io.github.axolotlclient.AxolotlClientConfig.api.manager.ConfigManager; import io.github.axolotlclient.AxolotlClientConfig.api.options.OptionCategory; @@ -45,185 +43,62 @@ public class OldAnimationsConfig { private final OptionCategory categoryItems = OptionCategory.create("items"); private final OptionCategory categorySpriteRendering = OptionCategory.create("spriteRendering"); private final OptionCategory categoryItemPositions = OptionCategory.create("itemPositions"); - private final OptionCategory categoryResources = OptionCategory.create("resources"); - private final OptionCategory categoryModels = OptionCategory.create("models"); - private final OptionCategory categoryTextures = OptionCategory.create("textures"); - private final OptionCategory categorySounds = OptionCategory.create("sounds"); - private final OptionCategory categoryParticles = OptionCategory.create("particles"); - private final OptionCategory categoryCombat = OptionCategory.create("combat"); - private final OptionCategory categoryGUI = OptionCategory.create("gui"); - private final OptionCategory categoryDebugOverlay = OptionCategory.create("debugOverlay"); - private final OptionCategory categoryTabOverlay = OptionCategory.create("tabOverlay"); - private final OptionCategory categoryEnchantmentGlint = OptionCategory.create("enchantmentGlint"); - private final OptionCategory categoryHitbox = OptionCategory.create("hitbox"); private final OptionCategory categoryOffsets = OptionCategory.create("offsets"); public final BooleanOption useAndMine = new BooleanOption("useAndMine", true); public final BooleanOption useAndMineParticles = new BooleanOption("useAndMineParticles", true); + public final BooleanOption useAndMineSound = new BooleanOption("useAndMineSound", true); public final BooleanOption blockHitting = new BooleanOption("blockHitting", true); - public final BooleanOption firstPersonPositions = new BooleanOption("firstPersonPositions", true); - public final BooleanOption secondLayerDamageTint = new BooleanOption("secondLayerDamageTint", true); - public final BooleanOption smoothSneaking = new BooleanOption("smoothSneaking", true); - public final BooleanOption heartFlashing = new BooleanOption("heartFlashing", true); - public final BooleanOption show1_7_10 = new BooleanOption("show1_7_10", true); - public final BooleanOption debugInfo = new BooleanOption("debugInfo", true); - public final BooleanOption disableDebugBackground = new BooleanOption("disableDebugBackground", true); - public final BooleanOption alwaysShowCrosshair = new BooleanOption("alwaysShowCrosshair", true); - public final BooleanOption debugTextSpacing = new BooleanOption("debugTextSpacing", true); - public final BooleanOption debugTextColorScheme = new BooleanOption("debugTextColorScheme", true); - public final BooleanOption debugTextShadow = new BooleanOption("debugTextShadow", true); - public final BooleanOption thirdPersonSneaking = new BooleanOption("thirdPersonSneaking", true); public final BooleanOption allowMiningCancel = new BooleanOption("allowMiningCancel", true); - public final BooleanOption damageTintColor = new BooleanOption("damageTintColor", true); - public final BooleanOption stickRod = new BooleanOption("stickRod", true); + public final BooleanOption miningProgressResetLogic = new BooleanOption("miningProgressResetLogic", true); public final BooleanOption blockingArm = new BooleanOption("blockingArm", true); - public final BooleanOption droppedItemSprite = new BooleanOption("droppedItemSprite", true); - public final BooleanOption mirroredProjectiles = new BooleanOption("mirroredProjectiles", true); - public final BooleanOption flameOffset = new BooleanOption("flameOffset", true); - public final BooleanOption disableTitles = new BooleanOption("disableTitles", true); - public final BooleanOption oldItemPickup = new BooleanOption("oldItemPickup", true); - public final BooleanOption oldGlint = new BooleanOption("oldGlint", true); - public final BooleanOption oldGuiGlint = new BooleanOption("oldGuiGlint", true); - public final BooleanOption oldGlintColor = new BooleanOption("oldGlintColor", true); - public final BooleanOption centeredSelectionMenus = new BooleanOption("centeredSelectionMenus", true); - public final BooleanOption tabDimensions = new BooleanOption("tabDimensions", true); - public final BooleanOption disableTabPlayerHeads = new BooleanOption("disableTabPlayerHeads", true); - public final BooleanOption disableTabHeader = new BooleanOption("disableTabHeader", true); - public final BooleanOption disableTabFooter = new BooleanOption("disableTabFooter", true); - public final BooleanOption equipLogic = new BooleanOption("equipLogic", true); - public final BooleanOption oldDamageTick = new BooleanOption("oldDamageTick", true); + public final BooleanOption swordBlockThirdPerson = new BooleanOption("swordBlockThirdPerson", true); public final BooleanOption oldSwingVisual = new BooleanOption("oldSwingVisual", true); public final BooleanOption oldSwingVisualParticles = new BooleanOption("oldSwingVisualParticles", true); + + public final BooleanOption smoothSneaking = new BooleanOption("smoothSneaking", true); public final BooleanOption slowUpSneak = new BooleanOption("slowUpSneak", true); - public final BooleanOption stopLineTranslateSneak = new BooleanOption("stopLineTranslateSneak", true); - public final BooleanOption oldGlintLayer = new BooleanOption("oldGlintLayer", true); - public final BooleanOption skullModel = new BooleanOption("skullModel", true); - public final BooleanOption xpOrbPosition = new BooleanOption("xpOrbPosition", true); - public final BooleanOption disableServerSelectionButtons = new BooleanOption("disableServerSelectionButtons", true); - public final BooleanOption disableUnknownServerIcon = new BooleanOption("disableUnknownServerIcon", true); - public final BooleanOption disableSkinCustomizationButton = new BooleanOption("disableSkinCustomizationButton", true); - public final BooleanOption oldMultiplayerSettingsPage = new BooleanOption("oldMultiplayerSettingsPage", true); + public final BooleanOption thirdPersonSneaking = new BooleanOption("thirdPersonSneaking", true); public final BooleanOption fixThirdPersonHeldItemSneakDeSync = new BooleanOption("fixThirdPersonHeldItemSneakDeSync", true); - public final BooleanOption oldBowRotation = new BooleanOption("oldBowRotation", true); - public final BooleanOption swordBlockThirdPerson = new BooleanOption("swordBlockThirdPerson", true); - public final BooleanOption fastGrass = new BooleanOption("fastGrass", true); - public final BooleanOption difficultyLogic = new BooleanOption("difficultyLogic", true); - public final BooleanOption moveSprintKeybind = new BooleanOption("moveSprintKeybind", true); - public final BooleanOption oldDamageTintLighting = new BooleanOption("oldDamageTintLighting", true); - public final BooleanOption refreshResourcesRegardless = new BooleanOption("refreshResourcesRegardless", true); - public final BooleanOption removeHitboxEyeLine = new BooleanOption("removeHitboxEyeLine", true); - public final BooleanOption hitboxOffset = new BooleanOption("hitboxOffset", true); - public final BooleanOption disableGlintOnBlocks = new BooleanOption("disableGlintOnBlocks", true); - public final BooleanOption separateDamageTintFromGlint = new BooleanOption("separateDamageTintFromGlint", true); public final BooleanOption doubleTapSneak = new BooleanOption("doubleTapSneak", true); + public final BooleanOption stopLineTranslateSneak = new BooleanOption("stopLineTranslateSneak", true); + + public final BooleanOption mirroredProjectiles = new BooleanOption("mirroredProjectiles", true); + public final BooleanOption droppedItemsFacePlayer = new BooleanOption("droppedItemsFacePlayer", true); + public final BooleanOption stickRod = new BooleanOption("stickRod", true); + public final BooleanOption equipLogic = new BooleanOption("equipLogic", true); public final BooleanOption framedItemLighting = new BooleanOption("framedItemLighting", true); - public final BooleanOption clientSideEntityMovement = new BooleanOption("clientSideEntityMovement", true); - public final BooleanOption voidFog = new BooleanOption("voidFog", true); - public final BooleanOption dontSortTabEntries = new BooleanOption("dontSortTabEntries", true); - public final BooleanOption hideScoreboardHearts = new BooleanOption("hideScoreboardHearts", true); - public final BooleanOption oldObjectivesPosition = new BooleanOption("oldObjectivesPosition", true); - public final BooleanOption miningProgressResetLogic = new BooleanOption("miningProgressResetLogic", true); - public final BooleanOption rowBasedEntryOrder = new BooleanOption("rowBasedEntryOrder", true); - public final BooleanOption dontUpdateEffectsHud = new BooleanOption("dontUpdateEffectsHud", true); - public final BooleanOption inventoryTextLighting = new BooleanOption("inventoryTextLighting", true); public final BooleanOption oldJumpBoostPotionColor = new BooleanOption("oldJumpBoostPotionColor", true); - public final BooleanOption controlsListButtonHeight = new BooleanOption("controlsListButtonHeight", true); - public final BooleanOption fire = new BooleanOption("fire", true); - public final BooleanOption eggEntityCollisionParticles = new BooleanOption("eggEntityCollisionParticles", true); - public final BooleanOption fallParticles = new BooleanOption("fallParticles", true); - public final BooleanOption noSkullLayerDamageTint = new BooleanOption("noSkullLayerDamageTint", true); - public final BooleanOption fireChargeSound = new BooleanOption("fireChargeSound", true); - public final BooleanOption skullBlockRendering = new BooleanOption("skullBlockRendering", true); - public final BooleanOption creeperOffset = new BooleanOption("creeperOffset", true); - public final BooleanOption hopperSound = new BooleanOption("hopperSound", true); - public final BooleanOption fireSound = new BooleanOption("fireSound", true); - public final BooleanOption disconnectScreen = new BooleanOption("disconnectScreen", true); - public final BooleanOption disconnectServerToTitleScreen = new BooleanOption("disconnectServerToTitleScreen", true); - public final BooleanOption customizeWorldPresetIcons = new BooleanOption("customizeWorldPresetIcons", true); - public final BooleanOption packFormatWarning = new BooleanOption("packFormatWarning", true); public final BooleanOption goldenCarrotCreativeTab = new BooleanOption("goldenCarrotCreativeTab", true); - public final BooleanOption fastSmoothLighting = new BooleanOption("fastSmoothLighting", true); - public final BooleanOption litFurnaceMinecart = new BooleanOption("litFurnaceMinecart", true); - public final BooleanOption tallBlockBreakSync = new BooleanOption("tallBlockBreakSync", true); - public final BooleanOption buggedChatOpacity = new BooleanOption("buggedChatOpacity", true); - public final BooleanOption modelShadeAndAmbientOcclusion = new BooleanOption("modelShadeAndAmbientOcclusion", true); - public final BooleanOption fenceGateItemModel = new BooleanOption("fenceGateItemModel", true); - public final BooleanOption fenceGateWallMode = new BooleanOption("fenceGateWallMode", true); - public final BooleanOption itemModelSideQuadRendering = new BooleanOption("itemModelSideQuadRendering", false); - public final BooleanOption oldFastLeaves = new BooleanOption("oldFastLeaves", true); - public final BooleanOption opaqueLeavesTextures = new BooleanOption("opaqueLeavesTextures", true); - public final BooleanOption guiBlockItemsMipmap = new BooleanOption("guiBlockItemsMipmap", true); - public final BooleanOption tntZFighting = new BooleanOption("tntZFighting", true); - public final BooleanOption shadowOffset = new BooleanOption("shadowOffset", true); - public final BooleanOption showShadowInInventory = new BooleanOption("showShadowInInventory", true); - public final BooleanOption removeHitboxEyeVector = new BooleanOption("removeHitboxEyeVector", true); - public final BooleanOption randomizeDoorSound = new BooleanOption("randomizeDoorSound", true); - public final BooleanOption witherArmorTexture = new BooleanOption("witherArmorTexture", true); - public final BooleanOption horseRiderEyeHeight = new BooleanOption("horseRiderEyeHeight", true); - public final BooleanOption sleepEyeHeight = new BooleanOption("sleepEyeHeight", true); - public final BooleanOption mipmapPrecision = new BooleanOption("mipmapPrecision", true); - public final BooleanOption dispenserClickSound = new BooleanOption("dispenserClickSound", true); - public final BooleanOption potionEntityOffset = new BooleanOption("potionEntityOffset", true); - public final BooleanOption playerEyeHeightOffset = new BooleanOption("playerEyeHeightOffset", true); - public final BooleanOption dontShowFallParticlesOnFences = new BooleanOption("dontShowFallParticlesOnFences", true); - public final BooleanOption zombieVillagerHelmetOffset = new BooleanOption("zombieVillagerHelmetOffset", true); - public final BooleanOption mobSizeDimensions = new BooleanOption("mobSizeDimensions", true); - public final BooleanOption droppedItemsFacePlayer = new BooleanOption("droppedItemsFacePlayer", true); - public final BooleanOption dontAsyncReloadResources = new BooleanOption("dontAsyncReloadResources", true); - public final BooleanOption inventoryPressurePlateDimensions = new BooleanOption("inventoryPressurePlateDimensions", true); - public final BooleanOption mipmapAllBlocks = new BooleanOption("mipmapAllBlocks", true); - public final BooleanOption projectileSprite = new BooleanOption("projectileSprite", true); + + public final BooleanOption droppedItemSprite = new BooleanOption("droppedItemSprite", true); public final BooleanOption swapDroppedItemNormals = new BooleanOption("swapDroppedItemNormals", true); + public final BooleanOption projectileSprite = new BooleanOption("projectileSprite", true); public final BooleanOption swapProjectileSpriteNormals = new BooleanOption("swapProjectileSpriteNormals", true); public final BooleanOption framedItemSprite = new BooleanOption("framedItemSprite", true); public final BooleanOption swapFramedItemSpriteNormals = new BooleanOption("swapFramedItemSpriteNormals", true); - public final BooleanOption framedItemPosition = new BooleanOption("framedItemPosition", true); + + public final BooleanOption firstPersonPositions = new BooleanOption("firstPersonPositions", true); public final BooleanOption thirdPersonPositions = new BooleanOption("thirdPersonPositions", true); + public final BooleanOption framedItemPosition = new BooleanOption("framedItemPosition", true); + public final BooleanOption oldBowRotation = new BooleanOption("oldBowRotation", true); public final BooleanOption trapDoorItemPosition = new BooleanOption("trapDoorItemPosition", true); - public final BooleanOption disableItemEntitySplashSound = new BooleanOption("disableItemEntitySplashSound", true); - public final BooleanOption useAndMineSound = new BooleanOption("useAndMineSound", true); - public final BooleanOption disableItemEntitySplashParticles = new BooleanOption("disableItemEntitySplashParticles", true); - public final BooleanOption fastGrassItem = new BooleanOption("fastGrassItem", true); + + public final BooleanOption oldItemPickup = new BooleanOption("oldItemPickup", true); + public final BooleanOption xpOrbPosition = new BooleanOption("xpOrbPosition", true); + public final BooleanOption flameOffset = new BooleanOption("flameOffset", true); + public final BooleanOption creeperOffset = new BooleanOption("creeperOffset", true); + public final BooleanOption shadowOffset = new BooleanOption("shadowOffset", true); + public final BooleanOption horseRiderEyeHeight = new BooleanOption("horseRiderEyeHeight", true); + public final BooleanOption sleepEyeHeight = new BooleanOption("sleepEyeHeight", true); + public final BooleanOption potionEntityOffset = new BooleanOption("potionEntityOffset", true); + public final BooleanOption playerEyeHeightOffset = new BooleanOption("playerEyeHeightOffset", true); + public final BooleanOption zombieVillagerHelmetOffset = new BooleanOption("zombieVillagerHelmetOffset", true); public final BooleanOption framedItemRotationOffset = new BooleanOption("framedItemRotationOffset", true); - private final BooleanSupplier[] suppliers = new BooleanSupplier[]{ - skullModel::get, - fastGrass::get, - fire::get, - oldJumpBoostPotionColor::get, - fastSmoothLighting::get, - modelShadeAndAmbientOcclusion::get, - fenceGateItemModel::get, - fenceGateWallMode::get, - itemModelSideQuadRendering::get, - opaqueLeavesTextures::get, - guiBlockItemsMipmap::get, - mipmapPrecision::get, -// creeperOffset::get, -// zombieVillagerHelmetOffset::get, - inventoryPressurePlateDimensions::get, - mipmapAllBlocks::get, - trapDoorItemPosition::get - }; - private final boolean[] previousStates = { - skullModel.get(), - fastGrass.get(), - fire.get(), - oldJumpBoostPotionColor.get(), - fastSmoothLighting.get(), - modelShadeAndAmbientOcclusion.get(), - fenceGateItemModel.get(), - fenceGateWallMode.get(), - itemModelSideQuadRendering.get(), - opaqueLeavesTextures.get(), - guiBlockItemsMipmap.get(), - mipmapPrecision.get(), -// creeperOffset.get(), -// zombieVillagerHelmetOffset.get(), - inventoryPressurePlateDimensions.get(), - mipmapAllBlocks.get(), - trapDoorItemPosition.get() - }; + /* toggling these two rebuilds cached game state, so their previous values are tracked */ + private boolean previousTrapDoorItemPosition = trapDoorItemPosition.get(); + private boolean previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); /** * The 1.7 features no longer have a master switch: every one of them is @@ -283,120 +158,6 @@ public void initConfig() { oldBowRotation, trapDoorItemPosition ); - category.add(categoryResources); - categoryResources.add( - mipmapPrecision, - mipmapAllBlocks, - guiBlockItemsMipmap, - oldFastLeaves, - litFurnaceMinecart, - tallBlockBreakSync, - tntZFighting, - dontAsyncReloadResources - ); - categoryResources.add(categoryModels); - categoryModels.add( - skullModel, - fastGrass, - fastGrassItem, - fire, - skullBlockRendering, - fenceGateItemModel, - fenceGateWallMode, - itemModelSideQuadRendering, - modelShadeAndAmbientOcclusion, - fastSmoothLighting, - inventoryPressurePlateDimensions - ); - categoryResources.add(categoryTextures); - categoryTextures.add( - opaqueLeavesTextures, - witherArmorTexture - ); - categoryResources.add(categorySounds); - categorySounds.add( - fireChargeSound, - hopperSound, - fireSound, - randomizeDoorSound, - dispenserClickSound, - disableItemEntitySplashSound - ); - categoryResources.add(categoryParticles); - categoryParticles.add( - eggEntityCollisionParticles, - fallParticles, - dontShowFallParticlesOnFences, - disableItemEntitySplashParticles - ); - category.add(categoryCombat); - categoryCombat.add( - clientSideEntityMovement, - secondLayerDamageTint, - damageTintColor, - oldDamageTick, - oldDamageTintLighting, - separateDamageTintFromGlint, - noSkullLayerDamageTint - ); - category.add(categoryGUI); - categoryGUI.add( - show1_7_10, - heartFlashing, - alwaysShowCrosshair, - centeredSelectionMenus, - disableServerSelectionButtons, - disableUnknownServerIcon, - disableSkinCustomizationButton, - oldMultiplayerSettingsPage, - difficultyLogic, - refreshResourcesRegardless, - moveSprintKeybind, - controlsListButtonHeight, - disableTitles, - dontUpdateEffectsHud, - inventoryTextLighting, - disconnectScreen, - disconnectServerToTitleScreen, - customizeWorldPresetIcons, - packFormatWarning, - buggedChatOpacity, - showShadowInInventory - ); - categoryGUI.add(categoryDebugOverlay); - categoryDebugOverlay.add( - debugInfo, - disableDebugBackground, - debugTextSpacing, - debugTextColorScheme, - debugTextShadow - ); - categoryGUI.add(categoryTabOverlay); - categoryTabOverlay.add( - tabDimensions, - disableTabPlayerHeads, - disableTabHeader, - disableTabFooter, - hideScoreboardHearts, - dontSortTabEntries, - rowBasedEntryOrder, - oldObjectivesPosition - ); - category.add(categoryEnchantmentGlint); - categoryEnchantmentGlint.add( - oldGlint, - oldGuiGlint, - oldGlintColor, - oldGlintLayer, - disableGlintOnBlocks - ); - category.add(categoryHitbox); - categoryHitbox.add( - removeHitboxEyeLine, - removeHitboxEyeVector, - hitboxOffset, - mobSizeDimensions - ); category.add(categoryOffsets); categoryOffsets.add( oldItemPickup, @@ -418,39 +179,28 @@ public void initConfig() { configManager.load(); /* attempt to prevent calling resourcereload during game init */ - for (int i = 0; i < suppliers.length; i++) { - previousStates[i] = suppliers[i].getAsBoolean(); - } + previousTrapDoorItemPosition = trapDoorItemPosition.get(); + previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); /* reload the resources upon toggling certain options */ reloadResources(); } - //todo: rewrite this to be more readable. also need to better document whats going on here + /** + * The trapdoor item model is baked at resource load, and potion colors are + * cached separately, so both need a nudge when their option is toggled. + */ private void reloadResources() { MinecraftClientEvents.TICK_END.register(client -> { - boolean needsReload = false; - boolean reloadPotionCache = false; - boolean reloadWorld = false; - for (int i = 0; i < suppliers.length; i++) { - boolean current = suppliers[i].getAsBoolean(); - if (current != previousStates[i]) { - previousStates[i] = current; - if (i == 3) { - reloadPotionCache = true; - } else if (i == 1 || i == 4 || i == 7 || i == 9) { - reloadWorld = true; - } else { - needsReload = true; - } - } - } - if (needsReload) { + if (trapDoorItemPosition.get() != previousTrapDoorItemPosition) { + previousTrapDoorItemPosition = trapDoorItemPosition.get(); Minecraft.getInstance().reloadResources(); reloadPotionColors = true; - } else { - if (reloadPotionCache) reloadPotionColors = true; - if (reloadWorld) Minecraft.getInstance().worldRenderer.reload(); + return; + } + if (oldJumpBoostPotionColor.get() != previousOldJumpBoostPotionColor) { + previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); + reloadPotionColors = true; } }); } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/AmbientOcclusionFaceMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/AmbientOcclusionFaceMixin.java deleted file mode 100644 index a47607421..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/AmbientOcclusionFaceMixin.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.client.render.block.BlockModelRenderer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -import java.util.BitSet; - -@Mixin(BlockModelRenderer.AmbientOcclusionFace.class) -public class AmbientOcclusionFaceMixin { - - @WrapOperation(method = "compute", at = @At(value = "INVOKE", target = "Ljava/util/BitSet;get(I)Z", ordinal = 3)) - private boolean axolotlclient$oldMinAmbientOcclusion(BitSet instance, int bitIndex, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fastSmoothLighting.get() && - /* only show when fast smooth lighting is active */ - Minecraft.getInstance().options.ambientOcclusion == 1) { - /* use simple vertex lightmap and brightness assignment */ - return false; - } - return original.call(instance, bitIndex); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockMixin.java deleted file mode 100644 index 3e09d5dfd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockMixin.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Block; -import net.minecraft.block.FireBlock; -import net.minecraft.block.HopperBlock; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(Block.class) -public class BlockMixin { - - @Shadow - @Final - public static Block.Sounds WOOD_SOUNDS; - - @Inject(method = "setSounds", at = @At("RETURN")) - private void axolotlclient$oldBlockSounds(Block.Sounds sounds, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled()) { - Block block = (Block) (Object) this; - if (OldAnimationsConfig.instance.fireSound.get() && block instanceof FireBlock) { - /* the sound of jumping around in fire uses the wood sound in 1.7 and prior :D */ - block.sounds = WOOD_SOUNDS; - } - - if (OldAnimationsConfig.instance.hopperSound.get() && block instanceof HopperBlock) { - /* MC-5991 */ - /* why were these blocks using wood sounds LMFAOOO */ - block.sounds = WOOD_SOUNDS; - } - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelAccessor.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelAccessor.java deleted file mode 100644 index 51c531400..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelAccessor.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import net.minecraft.client.render.model.block.BlockElement; -import net.minecraft.client.render.model.block.BlockModel; -import net.minecraft.client.render.model.block.ModelTransformations; -import net.minecraft.resource.Identifier; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; -import org.spongepowered.asm.mixin.gen.Invoker; - -import java.util.List; -import java.util.Map; - -@Mixin(BlockModel.class) -public interface BlockModelAccessor { - - /* saw this in the spongepowered discord server :p */ - @Invoker("") - static BlockModel createBlockModel(List list, Map map, boolean bl, boolean bl2, ModelTransformations modelTransformations) { - throw new AssertionError(); - } - - @Invoker("") - static BlockModel createBlockModel(Identifier identifier, List list, Map map, boolean bl, boolean bl2, ModelTransformations modelTransformations) { - throw new AssertionError(); - } - - @Accessor - ModelTransformations getTransformations(); - - @Accessor - Map getTextures(); - - @Accessor - void setParentLocation(Identifier identifier); -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelRendererMixin.java deleted file mode 100644 index af8c9f968..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelRendererMixin.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Block; -import net.minecraft.block.DoorBlock; -import net.minecraft.block.DoublePlantBlock; -import net.minecraft.block.state.BlockState; -import net.minecraft.client.render.block.BlockModelRenderer; -import net.minecraft.client.render.vertex.BufferBuilder; -import net.minecraft.client.resource.model.BakedModel; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldView; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(BlockModelRenderer.class) -public class BlockModelRendererMixin { - - @Inject(method = "render(Lnet/minecraft/world/WorldView;Lnet/minecraft/client/resource/model/BakedModel;Lnet/minecraft/block/state/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/render/vertex/BufferBuilder;Z)Z", at = @At("HEAD"), cancellable = true) - private void axolotlclient$fixDoubleBlockDestroyModelDelay(WorldView worldView, BakedModel bakedModel, BlockState blockState, BlockPos blockPos, BufferBuilder bufferBuilder, boolean bl, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tallBlockBreakSync.get()) { - /* finally, i have fixed MC-53439 */ - Block block = blockState.getBlock(); - int metadata = block.getMetadataFromState(blockState); - boolean isUpperHalf = (metadata & 8) != 0; - boolean cancel = false; - - if (block instanceof DoorBlock) { - cancel = worldView.isAir(isUpperHalf ? blockPos.down() : blockPos.up()); - } - - if (block instanceof DoublePlantBlock) { - cancel = isUpperHalf && worldView.isAir(blockPos.down()); - } - - if (cancel) { - cir.setReturnValue(false); - } - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelShaperMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelShaperMixin.java deleted file mode 100644 index 0fddfdeb9..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelShaperMixin.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.OpaqueLeavesHandler; -import net.minecraft.block.Block; -import net.minecraft.block.GrassBlock; -import net.minecraft.block.state.BlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.render.block.BlockModelShaper; -import net.minecraft.client.resource.ModelIdentifier; -import net.minecraft.client.resource.model.BakedModel; -import net.minecraft.client.resource.model.ModelManager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(BlockModelShaper.class) -public abstract class BlockModelShaperMixin { - - @Shadow - public abstract ModelManager getManager(); - - @Inject(method = "getModel", at = @At("HEAD"), cancellable = true) - private void axolotlclient$useAlternativeModel(BlockState state, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled()) { - Block block = state.getBlock(); - if (OldAnimationsConfig.instance.opaqueLeavesTextures.get() && - OpaqueLeavesHandler.isOpaqueLeavesBlock(block)) { - cir.setReturnValue(getManager().getModel(new ModelIdentifier( - OpaqueLeavesHandler.getVariantName(block, state) + "_leaves_opaque", "inventory")) - ); - } - if (OldAnimationsConfig.instance.fastGrass.get() && block instanceof GrassBlock && - !Minecraft.getInstance().options.fancyGraphics) { - cir.setReturnValue(getManager().getModel(new ModelIdentifier("fast_grass", "inventory"))); - } - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ChatOptionsScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ChatOptionsScreenMixin.java deleted file mode 100644 index c008fb0df..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ChatOptionsScreenMixin.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.options.ChatOptionsScreen; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.gui.widget.OptionButtonWidget; -import net.minecraft.client.options.GameOptions; -import net.minecraft.client.render.model.PlayerModelPart; -import net.minecraft.client.resource.language.I18n; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyVariable; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ChatOptionsScreen.class) -public class ChatOptionsScreenMixin extends Screen { - - @Unique - private String axolotlclient$multiplayerOptionsTitle; - - @Unique - private int axolotlclient$seperatorWidth; - - /* this is probably the dumbest way of doing this */ - @Unique - private static final GameOptions.Option[] OLD_CHAT_OPTIONS = new GameOptions.Option[]{ - GameOptions.Option.CHAT_VISIBILITY, - GameOptions.Option.CHAT_COLOR, - GameOptions.Option.CHAT_LINKS, - GameOptions.Option.CHAT_OPACITY, - GameOptions.Option.CHAT_LINKS_PROMPT, - GameOptions.Option.CHAT_SCALE, - GameOptions.Option.CHAT_HEIGHT_FOCUSED, - GameOptions.Option.CHAT_HEIGHT_UNFOCUSED, - GameOptions.Option.CHAT_WIDTH - }; - - @Unique - private int axolotlclient$i; - - //TODO: Can this be done better? most likely- - @ModifyVariable(method = "init", at = @At("LOAD"), index = 1) - private int axolotlclient$captureAndUpdateLocal(int original) { - /* this is a horrible injection, but its all i could come up with :p */ - axolotlclient$i = original; - return original; - } - - @ModifyExpressionValue(method = "init", at = @At(value = "FIELD", opcode = Opcodes.GETSTATIC, target = "Lnet/minecraft/client/gui/screen/options/ChatOptionsScreen;CHAT_OPTIONS:[Lnet/minecraft/client/options/GameOptions$Option;")) - private GameOptions.Option[] axolotlclient$removeReducedDebugInfo(GameOptions.Option[] original) { - /* this modification is really stupid and needs to be re-written */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get() ? OLD_CHAT_OPTIONS : original; - } - - @Inject(method = "init", at = @At(value = "INVOKE", target = "Ljava/util/List;add(Ljava/lang/Object;)Z", ordinal = 2)) - private void axolotlclient$addCapeToggle(CallbackInfo ci) { - /* adds a cape toggle button */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get()) { - int i = axolotlclient$i + 1 /* because of the shitty injections above, i need to add 1 */; - /* in 1.8.1, this "multiplayer settings" text was removed in favor of saying "chat settings" due to MC-69983 */ - /* the text still exists in the lang files tho :p */ - axolotlclient$multiplayerOptionsTitle = I18n.translate("options.multiplayer.title"); - if (i % 2 == 1) { - i++; - } - axolotlclient$seperatorWidth = height / 6 + 24 * (i >> 1); - i += 2; - buttons.add(new OptionButtonWidget(2004, width / 2 - 155 + i % 2 * 160, height / 6 + 24 * (i >> 1), getButtonLabel(PlayerModelPart.CAPE))); - } - } - - @ModifyExpressionValue(method = "init", at = @At(value = "CONSTANT", args = "intValue=120")) - private int axolotlclient$moveDoneButton(int original) { - /* move done button so that it does not cover the cape button. value taken from 1.7 */ - return original + (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get() ? 48 : 0); - } - - @Inject(method = "buttonClicked", at = @At("TAIL")) - public void axolotlclient$addCapeButtonFunction(ButtonWidget buttonWidget, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get() && - buttonWidget.active && buttonWidget.id == 2004) { - /* adapted from SkinCustomizationScreen class */ - PlayerModelPart playerModelPart = PlayerModelPart.CAPE; - minecraft.options.togglePlayerModelPart(playerModelPart); - buttonWidget.message = getButtonLabel(playerModelPart); - } - } - - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/options/ChatOptionsScreen;drawCenteredString(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V", shift = At.Shift.AFTER)) - public void axolotlclient$addMultiplayerText(int i, int j, float f, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get()) { - /* adds the appropriate label straight from 1.7 */ - drawCenteredString(textRenderer, axolotlclient$multiplayerOptionsTitle, width / 2, axolotlclient$seperatorWidth + 7, 16777215); - } - } - - /* adapted from SkinCustomizationScreen class */ - @Unique - private String getButtonLabel(PlayerModelPart playerModelPart) { - String string; - if (minecraft.options.getPlayerModelParts().contains(playerModelPart)) { - string = I18n.translate("options.on"); - } else { - string = I18n.translate("options.off"); - } - return "Show " + playerModelPart.getName().getFormattedString() + ": " + string; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientPlayNetworkHandlerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientPlayNetworkHandlerMixin.java index 89f489b95..e6b9338b1 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientPlayNetworkHandlerMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientPlayNetworkHandlerMixin.java @@ -19,43 +19,15 @@ package io.github.axolotlclient.oldanimations.mixin; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Block; -import net.minecraft.block.FenceBlock; -import net.minecraft.block.FenceGateBlock; -import net.minecraft.block.WallBlock; import net.minecraft.client.network.handler.ClientPlayNetworkHandler; -import net.minecraft.client.options.GameOptions; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.Entity; -import net.minecraft.entity.ItemEntity; -import net.minecraft.entity.particle.ParticleType; -import net.minecraft.network.packet.s2c.play.ParticleS2CPacket; -import net.minecraft.network.packet.s2c.play.TitlesS2CPacket; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.Difficulty; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.Random; @Mixin(ClientPlayNetworkHandler.class) public abstract class ClientPlayNetworkHandlerMixin { - @Shadow - private ClientWorld world; - - @Shadow - @Final - private Random random; - @ModifyExpressionValue(method = "handleAddExperienceOrb", at = @At(value = "CONSTANT", args = "doubleValue=32")) private double axolotlclient$oldOrbRendering(double original) { return original / (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.xpOrbPosition.get() ? @@ -69,80 +41,4 @@ public abstract class ClientPlayNetworkHandlerMixin { /* taken from 1.7 */ return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldItemPickup.get() ? -0.5F : original; } - - @Inject(method = "handleTitles", at = @At("HEAD"), cancellable = true) - private void axolotlclient$disableTitlesPacket(TitlesS2CPacket packet, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableTitles.get()) { - /* 1.7 doesn't have titles */ - ci.cancel(); - } - } - - @WrapWithCondition(method = "handleLogin", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/options/GameOptions;difficulty:Lnet/minecraft/world/Difficulty;")) - private boolean axolotlclient$dontUsePacketDifficulty(GameOptions instance, Difficulty value) { - /* we're going to set the options difficulty elsewhere, so let's remove this as it's not needed */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.difficultyLogic.get(); - } - - //TODO: this may conflict with particles summoned by a command - @Inject(method = "handleParticle", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/PacketUtils;ensureOnSameThread(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/handler/PacketHandler;Lnet/minecraft/util/BlockableEventLoop;)V", shift = At.Shift.AFTER), cancellable = true) - private void axolotlclient$disableServerSideFallParticles(ParticleS2CPacket particleS2CPacket, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && particleS2CPacket.getType() == ParticleType.BLOCK_DUST && - particleS2CPacket.getVelocityScale() == 0.15F /* let's hope servers also use this scale factor */) { - /* luckily, the packet gives us enough information to reconstruct the 1.7 logic */ - int x = MathHelper.floor(particleS2CPacket.getX()); - int y = MathHelper.floor(particleS2CPacket.getY() - 0.2F); - int z = MathHelper.floor(particleS2CPacket.getZ()); - BlockPos blockPos = new BlockPos(x, y, z); - if (OldAnimationsConfig.instance.dontShowFallParticlesOnFences.get() && world.isAir(blockPos)) { - Block block = world.getBlockState(blockPos.down()).getBlock(); - if (block instanceof FenceBlock || block instanceof WallBlock || block instanceof FenceGateBlock) { - /* this is a bug. fences/walls don't emit particles - MC-30543 */ - /* Entity#move has a similar snippet */ - ci.cancel(); - return; - } - } - - if (OldAnimationsConfig.instance.fallParticles.get()) { - /* MC-30002 */ - /* we need a blank slate to adapt the 1.7 fall particles code */ - ci.cancel(); - int count = particleS2CPacket.getCount(); /* 150 * fallDistance */ - double fallDistance = count / 150.0; /* must be a double to ensure precision :p */ - for (int i = 0; i < count; ++i) { - float r1 = MathHelper.nextFloat(random, 0.0F, ((float) Math.PI * 2F)); - double r2 = MathHelper.nextFloat(random, 0.75F, 1.0F); - double velocityY = (double) 0.2F + fallDistance / (double) 100.0F; - double velocityX = (double) (MathHelper.cos(r1) * 0.2F) * r2 * r2 * (fallDistance + 0.2); - double velocityZ = (double) (MathHelper.sin(r1) * 0.2F) * r2 * r2 * (fallDistance + 0.2); - world.addParticle( - particleS2CPacket.getType(), - blockPos.getX() + 0.5F, - blockPos.getY() + 1.0F, - blockPos.getZ() + 0.5F, - velocityX, velocityY, velocityZ, - particleS2CPacket.getParameters() /* metadata for particle color */ - ); - } - } - } - } - - @WrapWithCondition(method = "handleSoundEvent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/world/ClientWorld;playSound(DDDLjava/lang/String;FFZ)V")) - private boolean axolotlclient$disableServerSideSplashSound(ClientWorld instance, double x, double y, double z, String sound, float volume, float pitch, boolean ignoreDistance) { - /* MC-3884 */ - /* without interfering with packets, we can just cancel the splash sound for item entities hehe */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableItemEntitySplashSound.get() && - sound.equals("game.neutral.swim.splash")) { - for (Entity entity : instance.entities) { - if (entity instanceof ItemEntity) { - /* i dont know if this is the best way to do this */ - //todo: gauge performance of this. - return false; - } - } - } - return true; - } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientWorldMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientWorldMixin.java deleted file mode 100644 index 452ae294d..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ClientWorldMixin.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Block; -import net.minecraft.block.state.BlockState; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.particle.ParticleType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.profiler.Profiler; -import net.minecraft.world.World; -import net.minecraft.world.WorldData; -import net.minecraft.world.dimension.Dimension; -import net.minecraft.world.gen.WorldGeneratorType; -import net.minecraft.world.storage.WorldStorage; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -import java.util.Random; - -@Mixin(ClientWorld.class) -public abstract class ClientWorldMixin extends World { - - protected ClientWorldMixin(WorldStorage worldStorage, WorldData worldData, Dimension dimension, Profiler profiler, boolean bl) { - super(worldStorage, worldData, dimension, profiler, bl); - } - - @WrapOperation(method = "doRandomDisplayTicks", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/state/BlockState;Ljava/util/Random;)V")) - private void axolotlclient$showDepthSuspendParticle(Block instance, World world, BlockPos blockPos, BlockState blockState, Random random, Operation original) { - /* renders the depth suspend particle */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.voidFog.get()) { - if (world.isAir(blockPos)) { - if (random.nextInt(8) > blockPos.getY() && - /* 1.7's hasFog() method */ - ((DimensionAccessor) dimension).getGeneratorType() != WorldGeneratorType.FLAT && !dimension.hasNoSky()) { - addParticle(ParticleType.SUSPENDED_DEPTH, blockPos.getX() + random.nextFloat(), blockPos.getY() + random.nextFloat(), blockPos.getZ() + random.nextFloat(), 0.0, 0.0, 0.0); - } - } else { - original.call(instance, world, blockPos, blockState, random); - } - } else { - original.call(instance, world, blockPos, blockState, random); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/CrashReportMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/CrashReportMixin.java deleted file mode 100644 index 1a50d8f20..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/CrashReportMixin.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.util.crash.CrashReport; -import net.minecraft.util.crash.CrashReportCategory; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -import java.util.concurrent.Callable; - -@Mixin(CrashReport.class) -public class CrashReportMixin { - - @WrapOperation(method = "fillSystemDetails", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/crash/CrashReportCategory;add(Ljava/lang/String;Ljava/util/concurrent/Callable;)V", ordinal = 0)) - private void axolotlclient$spoofCrashVersion(CrashReportCategory instance, String string, Callable callable, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get()) { - /* blame me for any future confusions ;) */ - /* on a real note, this injection is kinda poop */ - callable = () -> "1.7.10"; - } - original.call(instance, string, callable); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DifficultyCommandMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DifficultyCommandMixin.java deleted file mode 100644 index 99a8b420c..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DifficultyCommandMixin.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.server.command.DifficultyCommand; -import net.minecraft.server.command.source.CommandSource; -import net.minecraft.world.Difficulty; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(DifficultyCommand.class) -public class DifficultyCommandMixin { - - @Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;setDifficulty(Lnet/minecraft/world/Difficulty;)V")) - private void axolotlclient$syncCommandDifficulty(CommandSource commandSource, String[] strings, CallbackInfo ci, @Local Difficulty difficulty) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* this command doesn't work in 1.7. i might as well fix that! */ - Minecraft.getInstance().options.difficulty = difficulty; - Minecraft.getInstance().options.save(); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DimensionAccessor.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DimensionAccessor.java deleted file mode 100644 index 20be8eb35..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DimensionAccessor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import net.minecraft.world.dimension.Dimension; -import net.minecraft.world.gen.WorldGeneratorType; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(Dimension.class) -public interface DimensionAccessor { - - @Accessor - WorldGeneratorType getGeneratorType(); -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DoorBlockMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DoorBlockMixin.java deleted file mode 100644 index e1708efc6..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/DoorBlockMixin.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.SoundUtil; -import net.minecraft.block.DoorBlock; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(DoorBlock.class) -public class DoorBlockMixin { - - @ModifyArg(method = {"use", "updateOpenState", "neighborChanged"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;doEvent(Lnet/minecraft/entity/living/player/PlayerEntity;ILnet/minecraft/util/math/BlockPos;I)V"), index = 1) - private int axolotlclient$randomizeDoorSound(int original) { - /* MC-24778 */ - /* wrong door sounds must be played hehehe */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.randomizeDoorSound.get() ? SoundUtil.getDoorSound() : original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EggEntityMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EggEntityMixin.java deleted file mode 100644 index eedca077b..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EggEntityMixin.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.entity.particle.ParticleType; -import net.minecraft.entity.projectile.EggEntity; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(EggEntity.class) -public abstract class EggEntityMixin { - - @WrapOperation(method = "onCollision", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;addParticle(Lnet/minecraft/entity/particle/ParticleType;DDDDDD[I)V")) - private void axolotlclient$useSnowballParticle(World instance, ParticleType particleType, double d, double e, double f, double g, double h, double i, int[] is, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.eggEntityCollisionParticles.get()) { - /* MC-7807 */ - /* wild to think this was the particle used before 1.8 wtf */ - instance.addParticle(ParticleType.SNOWBALL, d, e, f, 0.0, 0.0, 0.0); - } else { - original.call(instance, particleType, d, e, f, g, h, i, is); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java index 0b6537158..e62ab0d38 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRenderDispatcherMixin.java @@ -18,21 +18,11 @@ package io.github.axolotlclient.oldanimations.mixin; -import com.llamalad7.mixinextras.expression.Definition; -import com.llamalad7.mixinextras.expression.Expression; -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.MobUtil; import io.github.axolotlclient.oldanimations.util.PlayerUtil; import net.minecraft.client.render.entity.EntityRenderDispatcher; -import net.minecraft.client.render.vertex.Tesselator; import net.minecraft.entity.Entity; -import net.minecraft.entity.living.LivingEntity; -import net.minecraft.util.math.Box; -import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArgs; @@ -41,56 +31,13 @@ @Mixin(EntityRenderDispatcher.class) public abstract class EntityRenderDispatcherMixin { - @Definition(id = "LivingEntity", type = LivingEntity.class) - @Expression("? instanceof LivingEntity") - @ModifyExpressionValue(method = "renderHitbox", at = @At(value = "MIXINEXTRAS:EXPRESSION")) - private boolean axolotlclient$disableEyeBox(boolean original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.removeHitboxEyeLine.get()) { - /* this doesn't exist in 1.7 */ - return false; - } - return original; - } - - @WrapOperation(method = "renderHitbox", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/vertex/Tesselator;end()V")) - private void axolotlclient$cancelDraw(Tesselator instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.removeHitboxEyeVector.get()) { - /* this is a neat trick to cancel rendering... although maybe i should remove the unused code at that */ - instance.getBuffer().end(); - } else { - original.call(instance); - } - } - @ModifyArgs(method = "renderHitbox", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/Box;(DDDDDD)V")) private void axolotlclient$oldHitboxBehavior(Args args, @Local(argsOnly = true) Entity entity) { - if (OldAnimationsConfig.isEnabled() && PlayerUtil.INSTANCE.isSelf(entity)) { + if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get() && PlayerUtil.INSTANCE.isSelf(entity)) { /* sneaking compatibility! */ - double eyeHeightOffset = OldAnimationsConfig.instance.thirdPersonSneaking.get() ? PlayerUtil.INSTANCE.getEyeHeight() - 1.62F : 0.0F; - /* man there were a lot of eyeheight bugs back in the day LOOOL - MC-4077 */ - double hitboxOffset = OldAnimationsConfig.instance.hitboxOffset.get() ? 1.62F : 0.0F; - args.set(1, (double) args.get(1) + eyeHeightOffset + hitboxOffset); - args.set(4, (double) args.get(4) + eyeHeightOffset + hitboxOffset); - } - } - - @WrapOperation(method = "renderHitbox", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/world/WorldRenderer;renderOutlineShape(Lnet/minecraft/util/math/Box;IIII)V", ordinal = 0)) - private void axolotlclient$oldHitboxDimensions(Box shape, int r, int g, int b, int a, Operation original, Entity entity, double dx, double dy, double dz, float yaw, float tickDelta, @Local(index = 10) float f) { - /* although this could be two features, i think it's best to combine it with the mob size/dimensions feature */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - /* taken from 1.7 */ - shape = new Box(dx - f, dy, dz - f, dx + f, dy + MobUtil.INSTANCE.oldMobHeight(entity, entity.height), dz + f); - } - original.call(shape, r, g, b, a); - } - - @ModifyExpressionValue(method = "renderHitbox", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/Entity;width:F")) - private float axolotlclient$oldMobWidth(float original, @Local(argsOnly = true) Entity entity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - /* since entity hitbox sizes are slightly different in 1.7, this is the closest we can get to emulating that */ - /* without altering combat */ - original = MobUtil.INSTANCE.oldMobWidth(entity, original); + double eyeHeightOffset = PlayerUtil.INSTANCE.getEyeHeight() - 1.62F; + args.set(1, (double) args.get(1) + eyeHeightOffset); + args.set(4, (double) args.get(4) + eyeHeightOffset); } - return original; } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRendererMixin.java index 44f4ca200..f5cebacf4 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRendererMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/EntityRendererMixin.java @@ -23,9 +23,7 @@ import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.MobUtil; import io.github.axolotlclient.oldanimations.util.PlayerUtil; -import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.platform.GlStateManager; import net.minecraft.entity.Entity; @@ -49,24 +47,6 @@ public abstract class EntityRendererMixin { return original; } - @ModifyExpressionValue(method = "renderOnFire", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/Entity;width:F")) - private float axolotlclient$oldMobWidth(float original, @Local(argsOnly = true) Entity entity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - /* since entity hitbox sizes are slightly different in 1.7, this is the closest we can get to emulating that */ - /* without altering combat */ - original = MobUtil.INSTANCE.oldMobWidth(entity, original); - } - return original; - } - - @ModifyExpressionValue(method = "renderNameTag(Lnet/minecraft/entity/Entity;Ljava/lang/String;DDDI)V", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/Entity;height:F")) - private float axolotlclient$oldMobHeight(float original, @Local(argsOnly = true) Entity entity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - original = MobUtil.INSTANCE.oldMobHeight(entity, original); - } - return original; - } - //todo: we can improve this a bit @WrapOperation(method = "postRender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderer;renderOnFire(Lnet/minecraft/entity/Entity;DDDF)V")) private void axolotlclient$includeEyeHeight$renderFire(EntityRenderer instance, Entity entity, double dx, double dy, double dz, float tickDelta, Operation original) { @@ -83,12 +63,6 @@ public abstract class EntityRendererMixin { } } - @WrapOperation(method = "postRender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderDispatcher;shouldRenderShadow()Z")) - private boolean axolotlclient$removeShadowCheck(EntityRenderDispatcher instance, Operation original) { - /* its already true by default but eh */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.showShadowInInventory.get() || original.call(instance); - } - @ModifyArg(method = "postRender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderer;renderShadow(Lnet/minecraft/entity/Entity;DDDFF)V"), index = 2) private double axolotlclient$addEyeHeightEntityPosition(double dy, @Local(argsOnly = true) Entity entity) { /* 1.7 has the player eyeheight factored into any y coord call*/ diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FenceGateBlockMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FenceGateBlockMixin.java deleted file mode 100644 index 2262bae78..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FenceGateBlockMixin.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.SoundUtil; -import net.minecraft.block.Blocks; -import net.minecraft.block.FenceGateBlock; -import net.minecraft.block.HorizontalFacingBlock; -import net.minecraft.block.state.BlockState; -import net.minecraft.block.state.property.BooleanProperty; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; -import net.minecraft.world.WorldView; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(FenceGateBlock.class) -public class FenceGateBlockMixin { - - @Shadow - @Final - public static BooleanProperty IN_WALL; - - @Inject(method = "resolveVirtualProperties", at = @At("HEAD"), cancellable = true) - public void axolotlclient$cobbleWallFenceGateLogic(BlockState blockState, WorldView worldView, BlockPos blockPos, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fenceGateWallMode.get()) { - /* directly ported from 1.7 */ - /* the actual bug fix was changing || to && */ - Direction direction = blockState.get(HorizontalFacingBlock.FACING); - if ((direction == Direction.NORTH || direction == Direction.SOUTH) && - worldView.getBlockState(blockPos.west()).getBlock() == Blocks.COBBLESTONE_WALL && worldView.getBlockState(blockPos.east()).getBlock() == Blocks.COBBLESTONE_WALL || - (direction == Direction.EAST || direction == Direction.WEST) && - worldView.getBlockState(blockPos.north()).getBlock() == Blocks.COBBLESTONE_WALL && worldView.getBlockState(blockPos.south()).getBlock() == Blocks.COBBLESTONE_WALL) { - blockState = blockState.set(IN_WALL, true); - } - cir.setReturnValue(blockState); - } - } - - @ModifyArg(method = {"use", "neighborChanged"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;doEvent(Lnet/minecraft/entity/living/player/PlayerEntity;ILnet/minecraft/util/math/BlockPos;I)V"), index = 1) - private int axolotlclient$randomizeFenceGateSound(int original) { - /* MC-24778 */ - /* wrong door sounds must be played hehehe */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.randomizeDoorSound.get() ? SoundUtil.getDoorSound() : original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FireChargeItemMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FireChargeItemMixin.java deleted file mode 100644 index b05f6aa8e..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FireChargeItemMixin.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.item.FireChargeItem; -import net.minecraft.item.Item; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(FireChargeItem.class) -public class FireChargeItemMixin extends Item { - - @WrapOperation(method = "useOn", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;playSound(DDDLjava/lang/String;FF)V")) - private void axolotlclient$fireChargeSound(World instance, double d, double e, double f, String string, float g, float h, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fireChargeSound.get()) { - /* MC-1831 */ - string = "fire.ignite"; - h = random.nextFloat() * 0.4F + 0.8F; - } - original.call(instance, d, e, f, string, g, h); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FurnaceMinecartEntityMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FurnaceMinecartEntityMixin.java deleted file mode 100644 index 5f7af3796..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/FurnaceMinecartEntityMixin.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.entity.vehicle.FurnaceMinecartEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(FurnaceMinecartEntity.class) -public class FurnaceMinecartEntityMixin { - - @WrapOperation(method = "getDefaultDisplayBlock", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/FurnaceMinecartEntity;isLit()Z")) - private boolean axolotlclient$alwaysShowLitFurnace(FurnaceMinecartEntity instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.litFurnaceMinecart.get()) { - /* in 1.7, the furnace minecart always renders a lit furnace lol */ - return true; - } - return original.call(instance); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/GameRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/GameRendererMixin.java index e6397f0b6..17a4d8aec 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/GameRendererMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/GameRendererMixin.java @@ -18,24 +18,13 @@ package io.github.axolotlclient.oldanimations.mixin; -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.modules.hud.HudManager; -import io.github.axolotlclient.modules.hud.gui.hud.vanilla.CrosshairHud; -import io.github.axolotlclient.oldanimations.OldAnimations; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; import io.github.axolotlclient.oldanimations.util.ducks.Sneaky; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.living.player.LocalClientPlayerEntity; import net.minecraft.client.render.GameRenderer; -import net.minecraft.client.render.texture.TextureAtlas; import net.minecraft.entity.Entity; import net.minecraft.entity.living.LivingEntity; -import net.minecraft.world.dimension.Dimension; -import net.minecraft.world.gen.WorldGeneratorType; -import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; @@ -104,12 +93,6 @@ public abstract class GameRendererMixin implements Sneaky { return axolotlclient$isEitherSneakOptionEnabled() ? axolotlclient$getEyeHeight() : x; } - @WrapOperation(method = "renderAxisIndicators", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/living/player/LocalClientPlayerEntity;hasReducedDebugInfo()Z")) - private boolean axolotlclient$disableAxisIndicator(LocalClientPlayerEntity instance, Operation original) { - boolean isCustomCrosshair = OldAnimations.AXOLOTLCLIENT && HudManager.getInstance().get(CrosshairHud.ID).isEnabled(); - return (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.alwaysShowCrosshair.get() && !isCustomCrosshair) || original.call(instance); - } - @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/ItemInHandRenderer;tick()V")) /* placed below null check */ private void axolotlclient$onTick(CallbackInfo ci) { /* updates the current eye height */ @@ -132,59 +115,6 @@ public abstract class GameRendererMixin implements Sneaky { } } - @ModifyExpressionValue(method = "applyHurtCam", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/LivingEntity;damagedTimer:I")) - private int axolotlclient$oldDamageTick(int original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldDamageTick.get()) { - //todo: find the source - return Math.max(original - 1, 0); - } - return original; - } - - @ModifyExpressionValue(method = "setupFog", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/render/GameRenderer;renderDistance:F", ordinal = 1)) - private float axolotlclient$renderVoidFog(float original, @Local(argsOnly = true) int i, @Local(argsOnly = true) float f) { - /* void fog logic taken straight from 1.7 */ - float gx = original; - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.voidFog.get()) { - Entity entity = minecraft.getCamera(); - Dimension dimension = minecraft.world.dimension; - if (i == 0 && - /* 1.7's hasFog() method */ - ((DimensionAccessor) dimension).getGeneratorType() != WorldGeneratorType.FLAT && !dimension.hasNoSky()) { - double d = ((entity.getLightLevel(f) & 15728640) >> 20) / 16.0 + (entity.prevY + (entity.y - entity.prevY) * f + 4.0) / 32.0; - if (d < 1.0) { - if (d < 0.0) { - d = 0.0; - } - d *= d; - float h = 100.0F * (float) d; - if (h < 5.0F) { - h = 5.0F; - } - if (gx > h) { - gx = h; - } - } - } - } - /* welcome back my friend */ - return gx; - } - - @Inject(method = "render(IFJ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/world/WorldRenderer;render(Lnet/minecraft/client/render/block/BlockLayer;DILnet/minecraft/entity/Entity;)I")) - private void axolotlclient$applyMipmapToBlocks(int anaglyphRenderPass, float tickDelta, long renderTimeLimit, CallbackInfo ci) { - /* optifine already does this, but i might as well give the player the option lol */ - minecraft.getTextureManager().get(TextureAtlas.BLOCKS_LOCATION).pushFilter(false, - OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mipmapAllBlocks.get() && - minecraft.options.mipmapLevels > 0 - ); - } - - @Inject(method = "render(IFJ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/world/WorldRenderer;render(Lnet/minecraft/client/render/block/BlockLayer;DILnet/minecraft/entity/Entity;)I", shift = At.Shift.AFTER)) - private void axolotlclient$applyMipmapToBlocks2(int anaglyphRenderPass, float tickDelta, long renderTimeLimit, CallbackInfo ci) { - minecraft.getTextureManager().get(TextureAtlas.BLOCKS_LOCATION).popFilter(); - } - @Unique private static float lerp(float delta, float start, float end) { /* taken straight from modern minecraft */ return start + delta * (end - start); diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/HumanoidSkullModelMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/HumanoidSkullModelMixin.java deleted file mode 100644 index 86819d307..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/HumanoidSkullModelMixin.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.model.ModelPart; -import net.minecraft.client.render.model.block.entity.HumanoidSkullModel; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(HumanoidSkullModel.class) -public class HumanoidSkullModelMixin { - /* 1.7 skulls don't have the hat layer :P */ - - @WrapWithCondition(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/ModelPart;addBox(FFFIIIF)V")) - private boolean axolotlclient$disableHatLayer(ModelPart instance, float f, float g, float h, int i, int j, int k, float l) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.skullBlockRendering.get(); - } - - @WrapWithCondition(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/ModelPart;setPos(FFF)V")) - private boolean axolotlclient$disableHatLayer2(ModelPart instance, float f, float g, float h) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.skullBlockRendering.get(); - } - - @WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/ModelPart;render(F)V")) - private boolean axolotlclient$disableHatLayer3(ModelPart instance, float f) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.skullBlockRendering.get(); - } - - @WrapWithCondition(method = "setupAnimation", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/render/model/ModelPart;rotationY:F")) - private boolean axolotlclient$disableHatLayer4(ModelPart instance, float value) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.skullBlockRendering.get(); - } - - @WrapWithCondition(method = "setupAnimation", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/render/model/ModelPart;rotationX:F")) - private boolean axolotlclient$disableHatLayer5(ModelPart instance, float value) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.skullBlockRendering.get(); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/IntegratedServerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/IntegratedServerMixin.java deleted file mode 100644 index 30104c3e4..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/IntegratedServerMixin.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.ModifyReturnValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.server.integrated.IntegratedServer; -import net.minecraft.world.Difficulty; -import net.minecraft.world.WorldData; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(IntegratedServer.class) -public abstract class IntegratedServerMixin { - - @Shadow - @Final - private Minecraft minecraft; - - @WrapOperation(method = "loadWorld", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/WorldData;getDifficulty()Lnet/minecraft/world/Difficulty;")) - private Difficulty axolotlclient$useGlobalDifficulty(WorldData instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* matches 1.7 difficulty logic */ - return null; - } - return original.call(instance); - } - - @ModifyReturnValue(method = "getDefaultDifficulty", at = @At("RETURN")) - private Difficulty axolotlclient$useGlobalDifficulty3(Difficulty original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* gotta use the global difficulty */ - return minecraft.options.difficulty; - } - return original; - } - - @WrapOperation(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;world:Lnet/minecraft/client/world/ClientWorld;")) - private ClientWorld axolotlclient$skipDifficultyAssign(Minecraft instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* because we re-introduced the difficulty setting in the ServerPlayerEntity#updateSettings */ - /* we don't need to set difficulty here anymore :[ */ - return null; - } - return original.call(instance); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemEntityRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemEntityRendererMixin.java index 5afed93f8..da07facde 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemEntityRendererMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemEntityRendererMixin.java @@ -24,8 +24,6 @@ import com.llamalad7.mixinextras.sugar.Local; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; import io.github.axolotlclient.oldanimations.util.ItemUtil; -import io.github.axolotlclient.oldanimations.util.OpaqueLeavesHandler; -import net.minecraft.block.Block; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.ItemEntityRenderer; @@ -34,10 +32,8 @@ import net.minecraft.client.render.platform.GlStateManager; import net.minecraft.client.resource.model.BakedModel; import net.minecraft.entity.ItemEntity; -import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyArg; @@ -46,9 +42,6 @@ @Mixin(ItemEntityRenderer.class) public abstract class ItemEntityRendererMixin extends EntityRenderer { - @Unique - private boolean axolotlclient$fastGraphics; - protected ItemEntityRendererMixin(EntityRenderDispatcher dispatcher) { super(dispatcher); } @@ -78,34 +71,6 @@ protected ItemEntityRendererMixin(EntityRenderDispatcher dispatcher) { } } - @Inject(method = "render(Lnet/minecraft/entity/ItemEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;blendFuncSeparate(IIII)V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPre$dropped(ItemEntity itemEntity, double d, double e, double f, float g, float h, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - axolotlclient$fastGraphics = false; - ItemStack itemStack = itemEntity.getItem(); - if (itemStack.getItem() instanceof BlockItem && OpaqueLeavesHandler.isOpaqueLeavesBlock(Block.byItem(itemStack.getItem()))) { - /* this is a continuation of what we see in ItemRendererMixin */ - axolotlclient$fastGraphics = true; - GlStateManager.disableAlphaTest(); - GlStateManager.disableBlend(); - } - } - - @Inject(method = "render(Lnet/minecraft/entity/ItemEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;disableBlend()V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPost$dropped(ItemEntity itemEntity, double d, double e, double f, float g, float h, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - if (axolotlclient$fastGraphics) { - GlStateManager.enableAlphaTest(); - axolotlclient$fastGraphics = false; - } - } - @WrapOperation(method = "render(Lnet/minecraft/entity/ItemEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;)V")) private void axolotlclient$useProperItemRenderer(ItemRenderer instance, ItemStack item, BakedModel model, Operation original) { if (OldAnimationsConfig.isEnabled()) { diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelGeneratorMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelGeneratorMixin.java deleted file mode 100644 index adbeb3a8d..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelGeneratorMixin.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.google.common.collect.Lists; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.model.block.BlockElement; -import net.minecraft.client.render.model.block.BlockElementFace; -import net.minecraft.client.render.model.block.BlockElementTexture; -import net.minecraft.client.render.model.block.ItemModelGenerator; -import net.minecraft.client.render.texture.TextureAtlasSprite; -import net.minecraft.util.math.Direction; -import org.lwjgl.util.vector.Vector3f; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; - -import java.util.Collections; -import java.util.List; - -@Mixin(ItemModelGenerator.class /* unmapped - C_4311621 */) -public abstract class ItemModelGeneratorMixin { - - @Shadow - protected abstract List addSideElements(TextureAtlasSprite textureAtlasSprite, String string, int i); - - @WrapOperation(method = "processFrames", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/block/ItemModelGenerator;addSideElements(Lnet/minecraft/client/render/texture/TextureAtlasSprite;Ljava/lang/String;I)Ljava/util/List;")) - private List axolotlclient$itemModelSideQuadRendering(ItemModelGenerator instance, TextureAtlasSprite textureAtlasSprite, String string, int i, Operation> original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.itemModelSideQuadRendering.get()) { - return axolotlclient$oldAddSideElements(textureAtlasSprite, string, i); - } - return addSideElements(textureAtlasSprite, string, i); - } - - @Unique - private List axolotlclient$oldAddSideElements(TextureAtlasSprite textureAtlasSprite, String string, int i) { - /* this was all manually ported/adapted from 1.7's held item renderer */ - - List list = Lists.newArrayList(); - - int width = textureAtlasSprite.getWidth(); - int height = textureAtlasSprite.getHeight(); - float uMin = 0.0F; - float vMin = 0.0F; - float uMax = 16.0F; - float vMax = 16.0F; - - float f = 0.5F * (uMin - uMax) / width; - float g = 0.5F * (vMax - vMin) / height; - - for (int i10 = 0; i10 < width; i10++) { - float h = (float) i10 / width; - float l = uMin + (uMax - uMin) * ((float) i10 / width) - f; - list.add(new BlockElement( - new Vector3f(h * 16.0F, 0.0F, 7.5F), new Vector3f(h * 16.0F, 16.0F, 8.5F), - Collections.singletonMap( - Direction.WEST, - new BlockElementFace(null, i, string, new BlockElementTexture(new float[]{l, vMin, l, vMax}, 0)) - ), null, true - )); - } - - for (int var14 = 0; var14 < width; var14++) { - float i12 = (float) var14 / width; - float m = uMin + (uMax - uMin) * i12 - f; - float q = i12 + 1.0F / width; - list.add(new BlockElement( - new Vector3f(q * 16.0F, 0.0F, 7.5F), new Vector3f(q * 16.0F, 16.0F, 8.5F), - Collections.singletonMap( - Direction.EAST, - new BlockElementFace(null, i, string, new BlockElementTexture(new float[]{m, vMin, m, vMax}, 0)) - ), null, true - )); - } - - for (int var15 = 0; var15 < height; var15++) { - float j = (float) var15 / height; - float n = vMax + (vMin - vMax) * j - g; - float r = j + 1.0F / height; - list.add(new BlockElement( - new Vector3f(0.0F, r * 16.0F, 7.5F), new Vector3f(16.0F, r * 16.0F, 8.5F), - Collections.singletonMap( - Direction.UP, - new BlockElementFace(null, i, string, new BlockElementTexture(new float[]{uMin, n, uMax, n}, 0)) - ), null, true - )); - } - - for (int var16 = 0; var16 < height; var16++) { - float k = (float) var16 / height; - float o = vMax + (vMin - vMax) * ((float) var16 / height) - g; - list.add(new BlockElement( - new Vector3f(0.0F, k * 16.0F, 7.5F), new Vector3f(16.0F, k * 16.0F, 8.5F), - Collections.singletonMap( - Direction.DOWN, - new BlockElementFace(null, i, string, new BlockElementTexture(new float[]{uMin, o, uMax, o}, 0)) - ), null, true - )); - } - - return list; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelShaperMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelShaperMixin.java index 3b0ff62fa..d0205b48b 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelShaperMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemModelShaperMixin.java @@ -19,17 +19,14 @@ package io.github.axolotlclient.oldanimations.mixin; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.OpaqueLeavesHandler; -import net.minecraft.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.TrapdoorBlock; import net.minecraft.block.material.Material; -import net.minecraft.block.state.BlockState; -import net.minecraft.client.Minecraft; import net.minecraft.client.render.item.ItemModelShaper; import net.minecraft.client.resource.ModelIdentifier; import net.minecraft.client.resource.model.BakedModel; import net.minecraft.client.resource.model.ModelManager; import net.minecraft.item.ItemStack; -import net.minecraft.item.SkullItem; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -43,30 +40,8 @@ public abstract class ItemModelShaperMixin { public abstract ModelManager getManager(); @Inject(method = "getModel(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/client/resource/model/BakedModel;", at = @At("HEAD"), cancellable = true) - private void axolotlclient$useCustomModels(ItemStack stack, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.skullModel.get() && stack.getItem() instanceof SkullItem) { - /* MC-4772 */ - String id = switch (stack.getMetadata()) { - case 0 -> "old_skull_skeleton"; - case 1 -> "old_skull_wither"; - case 2 -> "old_skull_zombie"; - case 4 -> "old_skull_creeper"; - default -> "old_skull_char"; - }; - cir.setReturnValue(getManager().getModel(new ModelIdentifier(id, "inventory"))); - } - - /* first feature im adding in 2026 lol. im rusty. sorry */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - Block block = Block.byItem(stack.getItem()); - if (OpaqueLeavesHandler.isOpaqueLeavesBlock(block)) { - BlockState state = block.getStateFromMetadata(stack.getMetadata()); - cir.setReturnValue(getManager().getModel(new ModelIdentifier( - OpaqueLeavesHandler.getVariantName(block, state) + "_leaves_opaque", "inventory"))); - } - } - - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.trapDoorItemPosition.get() ) { + private void axolotlclient$useCustomModels(ItemStack stack, CallbackInfoReturnable cir) { + if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.trapDoorItemPosition.get()) { /* not sure why, 1.8 trapdoors have a top or bottom model */ /* 1.7 has one that's like neutral which is what i've ported here */ Block block = Block.byItem(stack.getItem()); @@ -78,27 +53,5 @@ public abstract class ItemModelShaperMixin { } } } - - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fastGrass.get() && - Block.byItem(stack.getItem()) instanceof GrassBlock) { - /* unlike the block, the item never uses the fancy model in 1.7 */ - if (!OldAnimationsConfig.instance.fastGrassItem.get() && Minecraft.getInstance().options.fancyGraphics) { - /* we can give the user the option tho for fun */ - return; - } - cir.setReturnValue(getManager().getModel(new ModelIdentifier("fast_grass", "inventory"))); - } - - /* this was a pain in the ass to figure out... */ - if (Block.byItem(stack.getItem()) instanceof LiquidBlock) { - if (Block.byItem(stack.getItem()).getMaterial() == Material.WATER) { - cir.setReturnValue(getManager().getModel(new ModelIdentifier("water", "inventory"))); - } else if (Block.byItem(stack.getItem()).getMaterial() == Material.LAVA) { - cir.setReturnValue(getManager().getModel(new ModelIdentifier("lava", "inventory"))); - } - } - if (Block.byItem(stack.getItem()) instanceof FireBlock) { - cir.setReturnValue(getManager().getModel(new ModelIdentifier("fire", "inventory"))); - } - } + } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemRendererMixin.java index 4c3874a7f..aa08cf8e5 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemRendererMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemRendererMixin.java @@ -24,26 +24,15 @@ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.sugar.Local; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.GlintHandler; -import io.github.axolotlclient.oldanimations.util.GlintQuadModel; import io.github.axolotlclient.oldanimations.util.ItemUtil; -import io.github.axolotlclient.oldanimations.util.OpaqueLeavesHandler; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; import net.minecraft.client.render.entity.ItemRenderer; import net.minecraft.client.render.model.block.ModelTransformations; import net.minecraft.client.render.platform.GlStateManager; -import net.minecraft.client.render.texture.TextureAtlas; -import net.minecraft.client.render.texture.TextureManager; import net.minecraft.client.resource.model.BakedModel; import net.minecraft.client.resource.model.BakedQuad; -import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; -import net.minecraft.resource.Identifier; import net.minecraft.util.math.Direction; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.*; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @@ -55,35 +44,9 @@ @Mixin(ItemRenderer.class /* C_6823239 */) public abstract class ItemRendererMixin { - @Shadow - protected abstract void render(BakedModel model, int color); - - @Shadow - protected abstract void render(BakedModel model, ItemStack stack); - - @Shadow - public abstract boolean isGui3d(ItemStack itemStack); - - @Shadow - @Final - private static Identifier ENCHANTMENT_GLINT_LOCATION; - - @Shadow - @Final - private TextureManager textureManager; - @Unique private BakedModel axolotlclient$model = null; - @Unique - private int axolotlclient$glintColor = -8372020; - - @Unique - private boolean axolotlclient$isLayered; - - @Unique - private boolean axolotlclient$fastGraphics; - @Unique private ModelTransformations.Type axolotlclient$transform; @@ -142,40 +105,17 @@ public abstract class ItemRendererMixin { return quads; } - @ModifyArg(method = "renderItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderEnchantmentGlint(Lnet/minecraft/client/resource/model/BakedModel;)V")) - public BakedModel axolotlclient$replaceModel(BakedModel model) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlint.get() ? GlintHandler.getModel(model) : model; - } - - @ModifyArg(method = "render(Lnet/minecraft/client/resource/model/BakedModel;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;render(Lnet/minecraft/client/resource/model/BakedModel;ILnet/minecraft/item/ItemStack;)V"), index = 1) - private int axolotlclient$replaceColor(int color) { - axolotlclient$glintColor = color; - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlintColor.get() && - axolotlclient$transform != ModelTransformations.Type.GUI ? -10407781 : color; - } - - @WrapWithCondition(method = "renderItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderEnchantmentGlint(Lnet/minecraft/client/resource/model/BakedModel;)V")) - private boolean axolotlclient$disableBlocksGlint(ItemRenderer instance, BakedModel bakedModel, @Local(argsOnly = true) ItemStack itemStack) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableGlintOnBlocks.get() || !isGui3d(itemStack); - } - @Inject(method = "renderEnchantmentGlint", at = @At("HEAD"), cancellable = true) private void axolotlclient$disableDefaultGlint(CallbackInfo ci) { if (!OldAnimationsConfig.isEnabled()) { return; } - boolean isGui = OldAnimationsConfig.instance.oldGuiGlint.get() && axolotlclient$transform == ModelTransformations.Type.GUI; - if (isGui || axolotlclient$shouldBeSpriteOrSwapNormal(false)) { + if (axolotlclient$shouldBeSpriteOrSwapNormal(false)) { ci.cancel(); } } - @ModifyExpressionValue(method = "renderEnchantmentGlint", at = @At(value = "CONSTANT", args = "floatValue=8.0F")) - private float axolotlclient$modifyScale(float original) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlint.get() ? 1.0F / original : original; - } - @Inject(method = "renderItemInHand(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/block/ModelTransformations$Type;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderItemInHand(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;Lnet/minecraft/client/render/model/block/ModelTransformations$Type;)V")) private void axolotlclient$fastItemOffset(ItemStack stack, ModelTransformations.Type transformationType, CallbackInfo ci) { //todo: is this really needed? im not so sure anymore @@ -189,141 +129,8 @@ public abstract class ItemRendererMixin { } } - @Inject(method = "renderGuiItemModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;)V", shift = At.Shift.AFTER)) - private void axolotlclient$renderGuiGlint(ItemStack stack, int x, int y, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGuiGlint.get() && stack.hasEnchantmentGlint()) { - if (OldAnimationsConfig.instance.disableGlintOnBlocks.get() && isGui3d(stack)) { - return; - } - if (stack.hasEnchantmentGlint()) { - GlStateManager.depthMask(false); - GlStateManager.depthFunc(518); - GlStateManager.disableLighting(); - GlStateManager.blendFuncSeparate(772, 1, 0, 0); - textureManager.bind(ENCHANTMENT_GLINT_LOCATION); - GlStateManager.pushMatrix(); - GlStateManager.scalef(0.5F, 0.5F, 0.5F); - GlStateManager.translatef(0.0F, -0.25F, 0.0F); - render(new GlintQuadModel((float) (Minecraft.getTime() % 3000L) / 3000.0F, 4.0F), axolotlclient$glintColor); - render(new GlintQuadModel((float) (Minecraft.getTime() % 4873L) / 4873.0F, -1.0F), axolotlclient$glintColor); - GlStateManager.popMatrix(); - GlStateManager.blendFuncSeparate(770, 771, 1, 0); - GlStateManager.enableLighting(); - GlStateManager.depthFunc(515); - GlStateManager.depthMask(true); - textureManager.bind(TextureAtlas.BLOCKS_LOCATION); - } - } - } - //todo: AYO FIX THIS SHIT - @ModifyVariable(method = "renderQuads", at = @At(value = "HEAD"), argsOnly = true) - private List axolotlclient$filterModelQuads(List original, @Local(argsOnly = true) ItemStack itemStack) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlintLayer.get() && - /* just to be safe, let's skip rendering while projectiles and dropped items are 2d */ - (!OldAnimationsConfig.instance.droppedItemSprite.get() || - axolotlclient$transform == ModelTransformations.Type.FIRST_PERSON || - axolotlclient$transform == ModelTransformations.Type.THIRD_PERSON)) { - /* by default, items with multiple layers are rendered in multiple passes. MC-4660 and MC-4329 */ - /* in 1.7, the enchantment glint only shows on the base layer for whatever reason */ - List filtered = new ArrayList<>(original.size()); - for (BakedQuad quad : original) { - if (axolotlclient$isLayered == (quad.getTintIndex() > 0)) { - filtered.add(quad); - } - } - return filtered; - } - return original; - } - - @Inject(method = "renderItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;popMatrix()V")) - private void axolotlclient$renderAdditionalModelLayers(ItemStack itemStack, BakedModel bakedModel, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldGlintLayer.get() && !bakedModel.isCustomRenderer() - && !bakedModel.isGui3d() && /* gotta make sure we aren't rendering extra crap */ - (!OldAnimationsConfig.instance.droppedItemSprite.get() || - axolotlclient$transform == ModelTransformations.Type.FIRST_PERSON || - axolotlclient$transform == ModelTransformations.Type.THIRD_PERSON)) { - /* additional layers will be rendered without the glint :> */ - axolotlclient$isLayered = true; - render(bakedModel, itemStack); - axolotlclient$isLayered = false; - } - } - - //todo: can this feature be more concise? i have like 4 mixin injections. hmmm - @Inject(method = "renderItemInHand(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;Lnet/minecraft/client/render/model/block/ModelTransformations$Type;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;blendFuncSeparate(IIII)V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPre$held(ItemStack item, BakedModel model, ModelTransformations.Type transform, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - axolotlclient$fastGraphics = false; - if (item.getItem() instanceof BlockItem && OpaqueLeavesHandler.isOpaqueLeavesBlock(Block.byItem(item.getItem()))) { - /* MC-57356 */ - /* to my knowledge, leaf blocks are the only blocks affected by fast/fancy graphics */ - /* when it comes to their render layer. if theyre in their solid mode when it comes to world rendering */ - /* then we know fast graphics was enabled and so we can make the rendered item solid as well */ - /* we wont be messing with any other blocks */ - axolotlclient$fastGraphics = true; - GlStateManager.disableAlphaTest(); - GlStateManager.disableBlend(); - } - } - - @Inject(method = "renderItemInHand(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;Lnet/minecraft/client/render/model/block/ModelTransformations$Type;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;)V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPost$held(ItemStack item, BakedModel model, ModelTransformations.Type transform, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - if (axolotlclient$fastGraphics) { - GlStateManager.enableAlphaTest(); - GlStateManager.enableBlend(); - axolotlclient$fastGraphics = false; - } - } - - @Inject(method = "renderGuiItemModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;blendFunc(II)V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPre$gui(ItemStack item, int x, int y, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - axolotlclient$fastGraphics = false; - if (item.getItem() instanceof BlockItem && OpaqueLeavesHandler.isOpaqueLeavesBlock(Block.byItem(item.getItem()))) { - /* ditto */ - axolotlclient$fastGraphics = true; - GlStateManager.disableAlphaTest(); - GlStateManager.disableBlend(); - } - } - - @Inject(method = "renderGuiItemModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/resource/model/BakedModel;)V", shift = At.Shift.AFTER)) - private void axolotlclient$fastGraphicsLeavesPost$gui(ItemStack item, int x, int y, CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.oldFastLeaves.get() - || OldAnimationsConfig.instance.opaqueLeavesTextures.get()) { - return; - } - if (axolotlclient$fastGraphics) { - /* vanilla calls disableAlphaTest() right after this anyway, so we only */ - /* need to restore blend here to avoid leaking a disabled-blend state */ - GlStateManager.enableBlend(); - axolotlclient$fastGraphics = false; - } - } - - @ModifyArg(method = "renderGuiItemModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/texture/Texture;pushFilter(ZZ)V"), index = 1) - private boolean axolotlclient$guiItemsMipmap(boolean original) { - /* MC-57574 and MC-277768. idk why there was 2 bug reports */ - /* in 1.7, the gui block items had mipmapping affect them since they were the same blocks used for world rendering */ - /* in 1.8, there is a distinction between block items and actual world rendered blocks */ - /* luckily it's easy to turn on mipmapping for rendered items */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.guiBlockItemsMipmap.get() ? - Minecraft.getInstance().options.mipmapLevels > 0 : original; - } - @Inject(method = "renderGuiItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/ItemRenderer;renderGuiItemModel(Lnet/minecraft/item/ItemStack;II)V")) private void axolotlclient$addDepth(ItemStack stack, int xPosition, int yPosition, CallbackInfo ci) { /* this fixes that shiny glint effect at the root */ diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityMixin.java deleted file mode 100644 index 1fb02225b..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityMixin.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.ducks.ILivingEntity; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.living.ArmorStandEntity; -import net.minecraft.entity.living.LivingEntity; -import net.minecraft.entity.living.mob.monster.GuardianEntity; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(LivingEntity.class) -public abstract class LivingEntityMixin extends Entity implements ILivingEntity { - - @Shadow - public abstract float getHealth(); - - @Unique - private float axolotlclient$prevHealth; - - public LivingEntityMixin(World world) { - super(world); - } - - @Inject(method = "takeDamage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/living/LivingEntity;applyDamage(Lnet/minecraft/entity/damage/DamageSource;F)V", ordinal = 1)) - private void axolotlclient$cacheLastHealth(DamageSource damageSource, float f, CallbackInfoReturnable cir) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.heartFlashing.get()) { - /* light work, no reaction */ - axolotlclient$prevHealth = getHealth(); - } - } - - @WrapOperation(method = "moveRelative", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/living/LivingEntity;isLocallyControlled()Z")) - private boolean axolotlclient$clientSidedEntityMovement(LivingEntity instance, Operation original) { - /* in 1.7, entity movement/velocity has a clientside prediction component whereas in 1.8, it's solely serverside */ - /* due to the nature of the prediction, and its conflict with entity position packets, entities have choppy movement */ - /* fyberoptic (the goat) gives more information on this in MC-69655 */ - /* funnily enough, squids have insanely responsive knockback :p */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.clientSideEntityMovement.get() && - /* these entities don't exist in 1.7 so we should just avoid messing with their position */ - Minecraft.getInstance().isSingleplayer() && /* this only makes sense to be available in singleplayer */ - !(instance instanceof ArmorStandEntity) && !(instance instanceof GuardianEntity)) { - return true; - } - return original.call(instance); - } - - @Override - public float axolotlclient$getPrevHealth() { - return axolotlclient$prevHealth; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererAccessor.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererAccessor.java deleted file mode 100644 index 8d0e03362..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererAccessor.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import net.minecraft.client.render.entity.LivingEntityRenderer; -import net.minecraft.entity.living.LivingEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(LivingEntityRenderer.class) -public interface LivingEntityRendererAccessor { - - @Invoker - boolean invokeSetupOverlayColor(LivingEntity livingEntity, float f, boolean bl); - - @Invoker - void invokeTearDownOverlayColor(); -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererMixin.java index 04cbb3437..15ae05fa8 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/LivingEntityRendererMixin.java @@ -18,123 +18,30 @@ package io.github.axolotlclient.oldanimations.mixin; -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import io.github.axolotlclient.oldanimations.util.MobUtil; import io.github.axolotlclient.oldanimations.util.PlayerUtil; -import net.minecraft.client.render.entity.EntityRenderDispatcher; -import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.client.render.platform.GlStateManager; import net.minecraft.entity.living.LivingEntity; -import org.jetbrains.annotations.NotNull; -import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.nio.FloatBuffer; - @Mixin(LivingEntityRenderer.class) -public abstract class LivingEntityRendererMixin extends EntityRenderer implements IDamageTint { - - protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatcher) { - super(entityRenderDispatcher); - } - - @Shadow - protected abstract boolean setupOverlayColor(LivingEntity entity, float tickDelta, boolean alwaysRender); - - @Shadow - protected abstract void tearDownOverlayColor(); - - @Shadow - protected abstract int getOverlayColor(LivingEntity entity, float f, float timeDelta); - - @Shadow - protected FloatBuffer tintBuffer; - - @Shadow - protected abstract void renderModel(T entity, float walkAnimationProgress, float walkAnimationSpeed, float bob, float yaw, float pitch, float scale); - - @Unique - private float axolotlclient$tickDelta = 0.0F; - - @Inject(method = "render(Lnet/minecraft/entity/living/LivingEntity;DDDFF)V", at = @At("HEAD")) - private void axolotlclient$capturetickDelta(LivingEntity livingEntity, double d, double e, double f, float g, float h, CallbackInfo ci) { - axolotlclient$tickDelta = h; - } - - /* redirect here instead of wrapoperation for performance reasons */ - //todo: improve this - @Redirect(method = "render(Lnet/minecraft/entity/living/LivingEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;renderModel(Lnet/minecraft/entity/living/LivingEntity;FFFFFF)V", ordinal = 1)) - private void axolotlclient$cancelDamageBrightness(LivingEntityRenderer instance, T entity, float walkAnimationProgress, float walkAnimationSpeed, float bob, float yaw, float pitch, float scale) { - renderModel(entity, walkAnimationProgress, walkAnimationSpeed, bob, yaw, pitch, scale); - - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - - if (axolotlclient$setupOverlayColor(entity, axolotlclient$tickDelta)) { - renderModel(entity, walkAnimationProgress, walkAnimationSpeed, bob, yaw, pitch, scale); - DamageTint.unsetDamageTint(); - } - } - - @WrapOperation(method = "render(Lnet/minecraft/entity/living/LivingEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;F)Z")) - private boolean axolotlclient$cancelDamageBrightness(LivingEntityRenderer instance, LivingEntity livingEntity, float f, Operation original) { - /* cancel model damage tint */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageTintColor.get()) { - return false; - } - return original.call(instance, livingEntity, f); - } - - @WrapOperation(method = "renderLayers", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;FZ)Z")) - private boolean axolotlclient$cancelDamageBrightness2(LivingEntityRenderer instance, LivingEntity livingEntity, float f, boolean bl, Operation original) { - /* cancel layer damage tint */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.damageTintColor.get()) { - return false; - } - return original.call(instance, livingEntity, f, bl); - } +public abstract class LivingEntityRendererMixin { //TODO: this can probably be moved somewhere else like in the main entity rendering method @Inject(method = "render(Lnet/minecraft/entity/living/LivingEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;translatef(FFF)V")) - private void axolotlclient$addSneakTranslation(LivingEntity livingEntity, double d, double e, double f, float g, float h, CallbackInfo ci) { + private void axolotlclient$addSneakTranslation(LivingEntity livingEntity, double d, double e, double f, float g, float h, CallbackInfo ci) { if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonSneaking.get() && PlayerUtil.INSTANCE.isSelf(livingEntity)) { /* in order to match 1.7, we need to elevate the player model while sneaking */ /* the elevation will be the difference between the player's sneaking eyeheight and their actual eyeheight (1.62 meters) */ /* the player model should now move 1:1 with the crosshair */ GlStateManager.translatef(0.0F, 1.62F - PlayerUtil.INSTANCE.getEyeHeight(), 0.0F); } - } - - @ModifyExpressionValue(method = "setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;FZ)Z", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/LivingEntity;damagedTimer:I")) - private int axolotlclient$oldDamageTick(int original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldDamageTick.get()) { - //todo: find source T-T - return Math.max(original - 1, 0); - } - return original; - } - - @ModifyExpressionValue(method = "setupOverlayColor(Lnet/minecraft/entity/living/LivingEntity;FZ)Z", at = @At(value = "CONSTANT", args = "floatValue=1.0", ordinal = 0)) - private float axolotlclient$damageTintLighting(float original, @Local(index = 4, ordinal = 1) float f) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldDamageTintLighting.get()) { - return f; /* this will basically make the tint influenced by lighting which reverts the change in MC-4222 */ - } - return original; } @ModifyArg(method = "renderNameTag(Lnet/minecraft/entity/living/LivingEntity;DDD)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;translatef(FFF)V", ordinal = 0), index = 1) @@ -154,47 +61,4 @@ protected LivingEntityRendererMixin(EntityRenderDispatcher entityRenderDispatche } return original; } - - @ModifyExpressionValue(method = "renderNameTag(Lnet/minecraft/entity/living/LivingEntity;DDD)V", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/LivingEntity;height:F")) - private float axolotlclient$oldMobHeight(float original, @Local(argsOnly = true) LivingEntity livingEntity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - /* since entity hitbox sizes are slightly different in 1.7, this is the closest we can get to emulating that */ - /* without altering combat */ - original = MobUtil.INSTANCE.oldMobHeight(livingEntity, original); - } - return original; - } - - @ModifyExpressionValue(method = "applyRotation", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/LivingEntity;height:F")) - private float axolotlclient$oldMobHeight2(float original, @Local(argsOnly = true) LivingEntity livingEntity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - original = MobUtil.INSTANCE.oldMobHeight(livingEntity, original); - } - return original; - } - - @Override - public boolean axolotlclient$setupOverlayColor(@NotNull LivingEntity livingEntity, float tickDelta) { - /* revert 14w06a */ - /* trick to ensure the brightnessBuffer is updated */ - if (setupOverlayColor(livingEntity, tickDelta, true)) tearDownOverlayColor(); - /* if there are any performance issues, blame this */ - - final float f = livingEntity.getBrightness(tickDelta); - final int i = getOverlayColor(livingEntity, f, tickDelta); - final boolean flag = (i >> 24 & 0xFF) > 0; - - int hurtTime = livingEntity.damagedTimer; - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldDamageTick.get()) { - hurtTime = Math.max(hurtTime - 1, 0); - } - final boolean flag1 = hurtTime > 0 || livingEntity.deathTicks > 0; - - if (!flag && !flag1) { - return false; - } else { - DamageTint.setDamageTint(tintBuffer); - return true; - } - } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MinecraftMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MinecraftMixin.java index 2cbe9c6bb..052f3cd87 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MinecraftMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MinecraftMixin.java @@ -18,13 +18,7 @@ package io.github.axolotlclient.oldanimations.mixin; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.DolphinClient; -import io.github.axolotlclient.oldanimations.OldAnimations; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; import io.github.axolotlclient.oldanimations.util.PlayerUtil; import io.github.axolotlclient.oldanimations.util.ducks.IClientPlayerInteractionManager; @@ -33,16 +27,13 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.ParticleManager; import net.minecraft.client.entity.living.player.LocalClientPlayerEntity; -import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.options.GameOptions; import net.minecraft.client.sound.instance.SimpleSoundInstance; import net.minecraft.client.sound.system.SoundManager; import net.minecraft.client.world.ClientWorld; import net.minecraft.resource.Identifier; -import net.minecraft.util.crash.CrashReportCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.HitResult; -import org.lwjgl.opengl.Display; import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -50,9 +41,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import java.util.concurrent.Callable; @Mixin(value = Minecraft.class, priority = 2050 /* priority needed for custom window title */) public abstract class MinecraftMixin { @@ -78,21 +67,9 @@ public abstract class MinecraftMixin { @Shadow public ClientPlayerInteractionManager interactionManager; - @Shadow - public Screen screen; - - @Shadow - public abstract void reloadResources(); - @Shadow public abstract SoundManager getSoundManager(); - @Unique - private String axolotlclient$lastTitle = null; - - @Unique - private boolean axolotlclient$reloadTextures; - @Inject(method = "handleMouseDown", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/Minecraft;attackCooldown:I")) private void axolotlclient$oldMiningBehavior(boolean holdingAttack, CallbackInfo ci) { /* this was a massive pain in the butt to figure out */ @@ -160,77 +137,6 @@ public abstract class MinecraftMixin { return original; } - @Inject(method = "tick", at = @At("TAIL")) - private void axolotlclient$spoofTitleVersion(CallbackInfo ci) { - //todo: i can probably make this better - - /* nostalgia! */ - if (!OldAnimationsConfig.isEnabled()) { - return; - } - - String title; - if (OldAnimationsConfig.instance.show1_7_10.get()) { - if (OldAnimations.AXOLOTLCLIENT && DolphinClient.config().customWindowTitle.get()) { - title = "DolphinClient 1.7.10"; - } else { - /* hell yeah */ - title = "Minecraft 1.7.10"; - } - } else { - /* might as well ensure the custom title gets updated even when the show1_7_10 feature is disabled! */ - if (DolphinClient.config().customWindowTitle.get()) { - title = "DolphinClient 1.8.9"; - } else { - title = "Minecraft 1.8.9"; - } - } - - /* :p */ - if (!title.equals(axolotlclient$lastTitle)) { - Display.setTitle(title); - axolotlclient$lastTitle = title; - } - } - - @WrapOperation(method = "populateCrashReport", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/crash/CrashReportCategory;add(Ljava/lang/String;Ljava/util/concurrent/Callable;)V", ordinal = 0)) - private void axolotlclient$spoofCrashVersionAgain(CrashReportCategory instance, String string, Callable callable, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get()) { - /* we do a little trolling frfr ;) */ - /* ughhh, this injection is kinda poop */ - callable = () -> "1.7.10"; - } - original.call(instance, string, callable); - } - - @ModifyExpressionValue(method = "initSnooper", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;gameVersion:Ljava/lang/String;", opcode = Opcodes.GETFIELD)) - private String axolotlclient$spoofSnooperVersionAgain(String original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get()) { - return "1.7.10"; - } - return original; - } - - @Inject(method = "runGame", at = @At(value = "INVOKE_STRING", target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V", args = "ldc=scheduledExecutables")) - private void axolotlclient$oldReloadResouces(CallbackInfo ci) { - /* from 1.7 */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.dontAsyncReloadResources.get() && - (world == null || screen == null) && axolotlclient$reloadTextures) { - axolotlclient$reloadTextures = false; - reloadResources(); - } - } - - @Inject(method = "reloadResourcesAsync", at = @At("HEAD"), cancellable = true) - private void axolotlclient$removeAsyncResourceReloading(CallbackInfoReturnable> cir) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.dontAsyncReloadResources.get()) { - /* taken from 1.7. they dont async reload resources, rather, it's when there isn't a screen rendering */ - axolotlclient$reloadTextures = true; - /* lel */ - cir.setReturnValue(Futures.immediateFuture(null)); - } - } - // @Inject(method = "reloadResources", at = @At(value = "HEAD")) // private void axolotlclient$refreshEntityRenderer(CallbackInfo ci) { // /* this hopefully won't cause any weird memory issues. i need a reliable way to refresh entity models */ diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MobRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MobRendererMixin.java deleted file mode 100644 index 94e7314da..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/MobRendererMixin.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.MobUtil; -import net.minecraft.client.render.entity.MobRenderer; -import net.minecraft.entity.living.mob.MobEntity; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(MobRenderer.class) -public class MobRendererMixin { - - @ModifyExpressionValue(method = "renderRiders", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/mob/MobEntity;width:F")) - private float axolotlclient$oldMobWidth(float original, @Local(argsOnly = true) MobEntity entity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - /* since entity hitbox sizes are slightly different in 1.7, this is the closest we can get to emulating that */ - /* without altering combat */ - original = MobUtil.INSTANCE.oldMobWidth(entity, original); - } - return original; - } - - @ModifyExpressionValue(method = "renderRiders", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/entity/living/mob/MobEntity;height:F")) - private float axolotlclient$oldMobHeight(float original, @Local(argsOnly = true) MobEntity entity) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mobSizeDimensions.get()) { - original = MobUtil.INSTANCE.oldMobHeight(entity, original); - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ModelBakeryMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ModelBakeryMixin.java index aa9a723d7..2094331f8 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ModelBakeryMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ModelBakeryMixin.java @@ -18,328 +18,32 @@ package io.github.axolotlclient.oldanimations.mixin; +import java.util.List; +import java.util.Map; + import com.google.common.collect.Lists; -import com.llamalad7.mixinextras.injector.ModifyReturnValue; -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; import net.minecraft.block.Blocks; -import net.minecraft.client.render.model.block.*; import net.minecraft.client.resource.model.ModelBakery; import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.resource.Identifier; -import net.minecraft.util.math.Direction; -import org.lwjgl.util.vector.Vector3f; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.*; -import java.util.function.Predicate; - @Mixin(ModelBakery.class) public abstract class ModelBakeryMixin { - //TODO: this whole mixin class can be improved - - @Shadow - private Map> itemVariants; - @Shadow - protected abstract Identifier getModelsJsonLocation(Identifier identifier); - - @Unique - private static final Map SKULL_TEXTURES = Map.of( - "char", "items/skull_steve", - "creeper", "items/skull_creeper", - "skeleton", "items/skull_skeleton", - "wither", "items/skull_wither", - "zombie", "items/skull_zombie" - ); - - @Unique - private static final Identifier BUILTIN_GENERATED = new Identifier("minecraft:builtin/generated"); - - @Inject(method = "registerItemVariants", at = @At("TAIL")) - private void axolotlclient$registerCustomModels(CallbackInfo ci) { - //TODO: There HAS to be a better way of doing this T_T - // i really dont want to it this this - - List originalSkulls = itemVariants.get(Items.SKULL); - List oldSkulls = Arrays.asList("old_skull_skeleton", "old_skull_wither", "old_skull_zombie", "old_skull_char", "old_skull_creeper"); - originalSkulls.addAll(oldSkulls); - itemVariants.put(Items.SKULL, originalSkulls); - + private Map> itemVariants; + + /** + * The 1.7 trapdoor item model is a separate variant, so it has to be + * registered before {@code ItemModelShaper} can hand it out. + */ + @Inject(method = "registerItemVariants", at = @At("TAIL")) + private void axolotlclient$registerCustomModels(CallbackInfo ci) { itemVariants.put(Item.byBlock(Blocks.TRAPDOOR), Lists.newArrayList("trapdoor", "trapdoor_inventory")); itemVariants.put(Item.byBlock(Blocks.IRON_TRAPDOOR), Lists.newArrayList("iron_trapdoor", "iron_trapdoor_inventory")); - - itemVariants.put(Item.byBlock(Blocks.GRASS), Lists.newArrayList("grass", "fast_grass")); - - /* in order for 1.7 fast graphics leaves blocks to change on the fly, we need to have them on standby */ - /* aka they need to actually exist as their own block */ - /* if enough people complain ill change this system lol */ - List originalLeaves = itemVariants.get(Item.byBlock(Blocks.LEAVES)); - List opaqueLeaves = Arrays.asList("oak_leaves_opaque", "spruce_leaves_opaque", "birch_leaves_opaque", "jungle_leaves_opaque"); - originalLeaves.addAll(opaqueLeaves); - itemVariants.put(Item.byBlock(Blocks.LEAVES), originalLeaves); - - List originalLeaves2 = itemVariants.get(Item.byBlock(Blocks.LEAVES2)); - List opaqueLeaves2 = Arrays.asList("acacia_leaves_opaque", "dark_oak_leaves_opaque"); - originalLeaves2.addAll(opaqueLeaves2); - itemVariants.put(Item.byBlock(Blocks.LEAVES2), originalLeaves2); - } - - @ModifyReturnValue(method = "loadBlockModel", at = @At("RETURN")) - private BlockModel axolotlclient$interceptModelLoading(BlockModel original, @Local(argsOnly = true) Identifier identifier) { - if (!OldAnimationsConfig.isEnabled() || identifier.getPath().startsWith("builtin/")) { - return original; - } - - /* OptiFine does some trolling. luckily we can extract the model location fine from here */ - String model = getModelsJsonLocation(identifier).toString(); - - /* this was an absolute nightmare. the potted flowers, redstone components, and tripwire hook have AO on certain parts of the block. */ - /* it's not entirely possible to port that into 1.8's model system as AO is applied to the entire model as a whole */ - /* AO will be disabled if shade is disabled then. i think this will sell the illusion better :> */ - /* hoppers have a different geometrical composition in 1.8+ so the model shading may look different */ - /* shout out to MC-68302 for rounding up the affected models. */ - if (OldAnimationsConfig.instance.modelShadeAndAmbientOcclusion.get()) { - if (model.contains("models/block/comparator") && model.endsWith(".json") - || model.contains("models/block/repeater") && model.endsWith(".json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().noneMatch(face -> "#lit".equals(face.texture) || "#unlit".equals(face.texture)) && element.shade, - original.usesAmbientOcclusion()); - } - if (model.contains("models/block/wall_gate") && model.endsWith(".json")) { - /* this one is interesting. AO is off intentionally?? - MC-72469 */ - return BlockModelAccessor.createBlockModel( - original.getParentLocation(), - original.getElements(), - ((BlockModelAccessor) original).getTextures(), - true, - original.isGui3d(), - ((BlockModelAccessor) original).getTransformations() - ); - } - if (model.contains("models/block/lever") && model.endsWith(".json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().noneMatch(face -> "#lever".equals(face.texture)) && element.shade, - original.usesAmbientOcclusion()); - } - if (model.contains("models/block/brewing_stand") && model.endsWith(".json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().noneMatch(face -> "#stand".equals(face.texture)) && element.shade, - false); - } - if (model.contains("models/block/stem_") && model.endsWith(".json")) { - return axolotlclient$filterBlockModel(original, element -> false, original.usesAmbientOcclusion()); - } - if (model.contains("models/block/tripwire_hook") && model.endsWith(".json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().anyMatch(face -> face.cullFace != null) && element.shade, - false - ); - } - if (model.contains("models/block/cauldron") && model.endsWith(".json") || - model.contains("models/block/hopper") && model.endsWith(".json") || - model.contains("models/block/flower_pot.json")) { - return BlockModelAccessor.createBlockModel( - original.getParentLocation(), - original.getElements(), - ((BlockModelAccessor) original).getTextures(), - true, - original.isGui3d(), - ((BlockModelAccessor) original).getTransformations() - ); - } - if (model.contains("models/block/flower_pot_cross.json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().noneMatch(face -> "#plant".equals(face.texture)) && element.shade, - original.usesAmbientOcclusion()); - } - if (model.contains("models/block/flower_pot_cactus.json")) { - return axolotlclient$filterBlockModel(original, - element -> element.faces.values().stream().noneMatch(face -> "#cactus".equals(face.texture)) && element.shade, - original.usesAmbientOcclusion()); - } - } - - if (OldAnimationsConfig.instance.fire.get() && model.contains("models/block/fire_floor.json")) { - /* in 1.7, the fire rendering is actually wildly different */ - /* i've hard coded the model for fun... i can definitely provide json compatibility some day :) */ - //TODO: Fire can render on the sides/underside of blocks... yeah this will be a massive pain to port - return axolotlclient$tesselateFire(); - } - - if (OldAnimationsConfig.instance.inventoryPressurePlateDimensions.get() && model.contains("models/block/pressure_plate_inventory.json")) { - /* in 1.7, the pressure plate model has the widths of a normal block */ - /* i've hard coded the model for fun... i can definitely provide json compatibility some day :) */ - //todo: this is a horrible hardcode - return axolotlclient$tesselatePressurePlate(); - } - - if (OldAnimationsConfig.instance.skullModel.get()) { - /* although possible through a resource pack, i would like to include this feature */ - /* the implementation should be flexible enough too */ - /* defines our 1.7 skull model! */ - String search = "models/item/skull_"; - String suffix = ".json"; - int typeStart = model.indexOf(search); - if (typeStart >= 0) { - int begin = typeStart + search.length(); - int end = model.indexOf(suffix, begin); - if (end > begin) { - /* we needed to extract "char" or "zombie" from the identifier location */ - String type = model.substring(begin, end); - BlockModelAccessor blockModel = (BlockModelAccessor) original; - blockModel.setParentLocation(BUILTIN_GENERATED); - blockModel.getTextures().put("layer0", SKULL_TEXTURES.get(type)); - } - } - } - - /* these two models below have some tomfoolery going on. sorry */ - if (OldAnimationsConfig.instance.fenceGateItemModel.get()) { - /* thought it would be nice to hardcode this in */ - /* this model is only used for the held item/inventory/dropped item */ - String search = "models/item/"; - String suffix = "_fence_gate.json"; - int typeStart = model.indexOf(search); - if (typeStart >= 0) { - int begin = typeStart + search.length(); - int end = model.indexOf(suffix, begin); - if (end > begin) { - /* we needed to extract the wood type from the identifier location */ - String type = model.substring(begin, end); - ((BlockModelAccessor) original).setParentLocation(new Identifier("minecraft:block/" + type + "_fence_gate_inventory")); - } - } - } - - return original; - } - - @Unique - private BlockModel axolotlclient$filterBlockModel(BlockModel original, Predicate shadePredicate, boolean ambientOcclusion) { - List filteredElements = original.getElements().stream() - .map(element -> new BlockElement( - element.from, - element.to, - element.faces, - element.rotation, - shadePredicate.test(element) - )).toList(); - - return BlockModelAccessor.createBlockModel( - original.getParentLocation(), - filteredElements, - ((BlockModelAccessor) original).getTextures(), - ambientOcclusion, - original.isGui3d(), - ((BlockModelAccessor) original).getTransformations() - ); - } - - @Unique - private BlockModel axolotlclient$tesselatePressurePlate() { - /* there is no practical reason for me hardcoding this model in. i just thought it would be funny to do this by hand :p */ - Map map = new HashMap<>(); - map.put("particle", "#texture"); - - Map faces = new HashMap<>(); - faces.put(Direction.DOWN, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 1, 15, 15}, 0))); - faces.put(Direction.UP, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 1, 15, 15}, 0))); - faces.put(Direction.NORTH, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 6, 15, 10}, 0))); - faces.put(Direction.SOUTH, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 6, 15, 10}, 0))); - faces.put(Direction.WEST, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 6, 15, 10}, 0))); - faces.put(Direction.EAST, new BlockElementFace(null, -1, "#texture", - new BlockElementTexture(new float[]{1, 6, 15, 10}, 0))); - - List list = new ArrayList<>(1); - list.add(new BlockElement( - new Vector3f(0, 6, 0), new Vector3f(16, 10, 16), - faces, - null, - true - )); - - return BlockModelAccessor.createBlockModel(list, map, false, true, ModelTransformations.NONE); - } - - @Unique - private BlockModel axolotlclient$tesselateFire() { - /* there is no practical reason for me hardcoding this model in. i just thought it would be funny to do this by hand :p */ - Map map = Map.of( - "fire0", "blocks/fire_layer_0", - "fire1", "blocks/fire_layer_1" - ); - - final BlockElementTexture texture_uv = new BlockElementTexture(new float[]{0, 0, 16, 16}, 0); - final Vector3f origin = (Vector3f) (new Vector3f(8, 8, 8).scale(0.0625F)); - - List list = new ArrayList<>(8); - - /* diagonal inner planes */ - list.add(new BlockElement( - new Vector3f(0, 0, 8), new Vector3f(16, 22.4f, 8), - Collections.singletonMap(Direction.SOUTH, new BlockElementFace(null, -1, "#fire1", texture_uv)), - new BlockElementRotation(origin, Direction.Axis.X, -22.5f, true), - false - )); - list.add(new BlockElement( - new Vector3f(0, 0, 8), new Vector3f(16, 22.4f, 8), - Collections.singletonMap(Direction.NORTH, new BlockElementFace(null, -1, "#fire1", texture_uv)), - new BlockElementRotation(origin, Direction.Axis.X, 22.5f, true), - false - )); - list.add(new BlockElement( - new Vector3f(8, 0, 0), new Vector3f(8, 22.4f, 16), - Collections.singletonMap(Direction.WEST, new BlockElementFace(null, -1, "#fire0", texture_uv)), - new BlockElementRotation(origin, Direction.Axis.Z, -22.5f, true), - false - )); - list.add(new BlockElement( - new Vector3f(8, 0, 0), new Vector3f(8, 22.4f, 16), - Collections.singletonMap(Direction.EAST, new BlockElementFace(null, -1, "#fire0", texture_uv)), - new BlockElementRotation(origin, Direction.Axis.Z, 22.5f, true), - false - )); - - /* vertical outer planes */ - list.add(new BlockElement( - new Vector3f(0, 0, 16), new Vector3f(16, 22.4f, 16), - Collections.singletonMap(Direction.SOUTH, new BlockElementFace(null, -1, "#fire0", texture_uv)), - null, - false - )); - list.add(new BlockElement( - new Vector3f(0, 0, 0), new Vector3f(16, 22.4f, 0), - Collections.singletonMap(Direction.NORTH, new BlockElementFace(null, -1, "#fire0", texture_uv)), - null, - false - )); - list.add(new BlockElement( - new Vector3f(0, 0, 0), new Vector3f(0, 22.4f, 16), - Collections.singletonMap(Direction.WEST, new BlockElementFace(null, -1, "#fire1", texture_uv)), - null, - false - )); - list.add(new BlockElement( - new Vector3f(16, 0, 0), new Vector3f(16, 22.4f, 16), - Collections.singletonMap(Direction.EAST, new BlockElementFace(null, -1, "#fire1", texture_uv)), - null, - false - - )); - - return BlockModelAccessor.createBlockModel(list, map, false, true, ModelTransformations.NONE); } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/PrimedTntRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/PrimedTntRendererMixin.java deleted file mode 100644 index f69362bc3..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/PrimedTntRendererMixin.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.entity.PrimedTntRenderer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(PrimedTntRenderer.class) -public abstract class PrimedTntRendererMixin { - - @WrapWithCondition(method = "render(Lnet/minecraft/entity/PrimedTntEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;disablePolygonOffset()V")) - private boolean axolotlclient$revertTntPolygonOffset() { - /* MC-1532 */ - /* bringing back the primed tnt z fighting lmao */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.tntZFighting.get(); - } - - @WrapWithCondition(method = "render(Lnet/minecraft/entity/PrimedTntEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;enablePolygonOffset()V")) - private boolean axolotlclient$revertTntPolygonOffset2() { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.tntZFighting.get(); - } - - @WrapWithCondition(method = "render(Lnet/minecraft/entity/PrimedTntEntity;DDDFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;polygonOffset(FF)V")) - private boolean axolotlclient$revertTntPolygonOffset3(float factor, float units) { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.tntZFighting.get(); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ServerPlayerEntityMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ServerPlayerEntityMixin.java deleted file mode 100644 index a161114a2..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ServerPlayerEntityMixin.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.mojang.authlib.GameProfile; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.living.player.PlayerEntity; -import net.minecraft.network.packet.c2s.play.ClientSettingsC2SPacket; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.entity.living.player.ServerPlayerEntity; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ServerPlayerEntity.class) -public abstract class ServerPlayerEntityMixin extends PlayerEntity { - - @Shadow - @Final - public MinecraftServer server; - - public ServerPlayerEntityMixin(World world, GameProfile gameProfile) { - super(world, gameProfile); - } - - @Inject(method = "updateSettings", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/data/SyncedData;update(ILjava/lang/Object;)V")) - private void axolotlclient$syncDifficulty(ClientSettingsC2SPacket clientSettingsC2SPacket, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get() && - server.isSingleplayer() && server.getUsername().equals(getName())) { - /* difficulty will be synced and updated anytime the player changes the difficulty */ - server.setDifficulty(Minecraft.getInstance().options.difficulty); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/SnooperMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/SnooperMixin.java deleted file mode 100644 index 2b94e5393..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/SnooperMixin.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.snooper.Snooper; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(Snooper.class) -public class SnooperMixin { - - @ModifyExpressionValue(method = "doInit", at = @At(value = "CONSTANT", args = "stringValue=1.8.9")) - private String axolotlclient$spoofSnooperVersion(String original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get()) { - /* heeeheee */ - return "1.7.10"; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasMixin.java deleted file mode 100644 index b2c5bc2e9..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasMixin.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.texture.AbstractTexture; -import net.minecraft.client.render.texture.TextureAtlas; -import org.spongepowered.asm.mixin.Dynamic; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -import java.awt.image.BufferedImage; - -@Mixin(TextureAtlas.class /* C_6088271 */) -public abstract class TextureAtlasMixin extends AbstractTexture { - - @Dynamic("Revert OptiFine mipmap scaling") - @WrapOperation(method = "loadAndStitch", at = @At(value = "INVOKE", target = "net/optifine/util/TextureUtils.scaleImage(Ljava/awt/image/BufferedImage;I)Ljava/awt/image/BufferedImage;"), require = 0) - private BufferedImage axolotlclient$revertOptiFineMipmapScale(BufferedImage bi, int w2, Operation original) { - /* i didnt want to do this but i had to */ - /* optifine breaks mipmapping :/ */ - return OldAnimationsConfig.isEnabled() ? bi : original.call(bi, w2); - } - - @ModifyArg(method = "loadAndStitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;log2(I)I", ordinal = 2)) - private int axolotlclient$oldMipmapScale(int original) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.mipmapPrecision.get() ? Integer.MAX_VALUE : original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasSpriteMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasSpriteMixin.java deleted file mode 100644 index 3f192a098..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TextureAtlasSpriteMixin.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.texture.TextureAtlasSprite; -import net.minecraft.client.resource.metadata.AnimationMetadata; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.awt.image.BufferedImage; - -@Mixin(TextureAtlasSprite.class) -public abstract class TextureAtlasSpriteMixin { - - @Inject(method = "load", at = @At(value = "INVOKE", target = "Ljava/util/List;add(Ljava/lang/Object;)Z", ordinal = 0)) - private void axolotlclient$oldInterpolateColor(BufferedImage[] image, AnimationMetadata animation, CallbackInfo ci, @Local int[][] is) { - /* this was removed in 1.8 for some reason */ - /* i have yet to see a difference with it however so im not sure if it meaningfully does anything */ - /* i probably wont give it its own toggle atp */ - if (OldAnimationsConfig.isEnabled()) { - interpolateColor(is); - } - } - - @Unique - private void interpolateColor(int[][] image) { - /* taken from 1.7 */ - int[] is = image[0]; - int i = 0; - int j = 0; - int k = 0; - int l = 0; - - for (int value : is) { - if ((value & 0xFF000000) != 0) { - j += value >> 16 & 0xFF; - k += value >> 8 & 0xFF; - l += value & 0xFF; - i++; - } - } - - if (i != 0) { - j /= i; - k /= i; - l /= i; - - for (int var11 = 0; var11 < is.length; var11++) { - if ((is[var11] & 0xFF000000) == 0) { - is[var11] = j << 16 | k << 8 | l; - } - } - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TrapdoorBlockMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TrapdoorBlockMixin.java deleted file mode 100644 index b538cbe64..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/TrapdoorBlockMixin.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.SoundUtil; -import net.minecraft.block.TrapdoorBlock; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(TrapdoorBlock.class) -public class TrapdoorBlockMixin { - - @ModifyArg(method = {"use", "neighborChanged"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;doEvent(Lnet/minecraft/entity/living/player/PlayerEntity;ILnet/minecraft/util/math/BlockPos;I)V"), index = 1) - private int axolotlclient$randomizeTrapdoorSound(int original) { - /* MC-24778 */ - /* wrong door sounds must be played hehehe */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.randomizeDoorSound.get() ? SoundUtil.getDoorSound() : original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WitherChargeLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WitherChargeLayerMixin.java deleted file mode 100644 index ebfbd802d..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WitherChargeLayerMixin.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.entity.layer.WitherChargeLayer; -import net.minecraft.resource.Identifier; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(WitherChargeLayer.class) -public class WitherChargeLayerMixin { - - @Unique - private static final Identifier OLD_WITHER_CHARGE_LOCATION = new Identifier("textures/entity/wither/wither_invulnerable.png"); - - @ModifyArg(method = "render(Lnet/minecraft/entity/living/mob/monster/boss/WitherEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/WitherRenderer;bindTexture(Lnet/minecraft/resource/Identifier;)V")) - private Identifier axolotlclient$useIncorrectWitherTexture(Identifier par1) { - /* MC-19702 */ - /* yeap. the wrong texture was being used lol */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.witherArmorTexture.get() ? OLD_WITHER_CHARGE_LOCATION : par1; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldMixin.java deleted file mode 100644 index 0a1539453..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldMixin.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.entity.Entity; -import net.minecraft.entity.ItemEntity; -import net.minecraft.entity.particle.ParticleType; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.List; - -@Mixin(World.class) -public class WorldMixin { - - @Shadow - @Final - public List entities; - - @Inject(method = "addParticle(IZDDDDDD[I)V", at = @At("HEAD"), cancellable = true) - private void axolotlclient$disableServerSideSplashParticles(int type, boolean ignoreDistance, double x, double y, double z, double velocityX, double velocityY, double velocityZ, int[] parameters, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableItemEntitySplashParticles.get() && - (type == ParticleType.WATER_BUBBLE.getId() || type == ParticleType.WATER_SPLASH.getId())) { - /* this didnt come with a bug report or anything but its very much related to MC-3884 */ - for (Entity entity : entities) { - if (entity instanceof ItemEntity) { - /* i dont know if this is the best way to do this */ - //todo: gauge performance of this. also change injection point some day - ci.cancel(); - } - } - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldRendererMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldRendererMixin.java deleted file mode 100644 index fbe805459..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/WorldRendererMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.render.world.WorldRenderer; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.util.math.BlockPos; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Slice; - -@Mixin(WorldRenderer.class /* C_8398976 */) -public class WorldRendererMixin { - - @WrapOperation( - method = "doEvent", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/world/ClientWorld;playSound(Lnet/minecraft/util/math/BlockPos;Ljava/lang/String;FFZ)V"), - slice = @Slice( /* once again, this is such a weird slice... thanks switch statements */ - from = @At(value = "CONSTANT", args = "stringValue=random.click", ordinal = 0), - to = @At(value = "CONSTANT", args = "stringValue=game.potion.smash") - ) - ) - private void axolotlclient$dispenserSounds(ClientWorld instance, BlockPos pos, String sound, float volume, float pitch, boolean ignoreDistance, Operation original) { - //todo: find bug report if any. it would be related to dispensers - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.dispenserClickSound.get()) { - /* we need to remove the centering on these sounds */ - /* dispenser click and projectile sounds are affected */ - instance.playSound(pos.getX(), pos.getY(), pos.getZ(), sound, volume, pitch, ignoreDistance); - } else { - original.call(instance, pos, sound, volume, pitch, ignoreDistance); - } - } - -// @Inject(method = "reload(Lnet/minecraft/client/resource/manager/ResourceManager;)V", at = @At("HEAD")) -// private void axolotlclient$refreshEntityRenderer(CallbackInfo ci) { -// /* please work */ -// entityRenderDispatcher = minecraft.getEntityRenderDispatcher(); -// } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ChatGuiMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ChatGuiMixin.java deleted file mode 100644 index 0bab9db03..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ChatGuiMixin.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.chat.ChatGui; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(ChatGui.class) -public class ChatGuiMixin { - - @WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;enableBlend()V")) - private boolean axolotlclient$oldChatOpacityState() { - /* MC-36812 */ - /* forge actually fixes this in 1.7 funnily enough */ - /* only the background will change opacity now lmao */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.buggedChatOpacity.get(); - } - - @WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;disableAlphaTest()V")) - private boolean axolotlclient$oldChatOpacityState2() { - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.buggedChatOpacity.get(); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DebugOverlayMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DebugOverlayMixin.java deleted file mode 100644 index 20fefaae4..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DebugOverlayMixin.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DebugComponents; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiElement; -import net.minecraft.client.gui.overlay.DebugOverlay; -import net.minecraft.client.render.TextRenderer; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.List; - -@Mixin(DebugOverlay.class) -public abstract class DebugOverlayMixin { - - @Shadow - @Final - private TextRenderer textRenderer; - - @ModifyExpressionValue(method = "getGameInfo", at = @At(value = "CONSTANT", args = "stringValue=Minecraft 1.8.9 (")) - private String axolotlclient$spoofDebugVersion(String original) { - /* nostalgiaaaa */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get() ? "Minecraft 1.7.10 (" : original; - } - - @WrapOperation(method = "getGameInfo", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;getGameVersion()Ljava/lang/String;")) - private String axolotlclient$spoofDebugVersion2(Minecraft instance, Operation original) { - /* why does it show the game version twice!!?? */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get() ? "1.7.10" : original.call(instance); - } - - @ModifyExpressionValue(method = "drawGameInfo", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/DebugOverlay;getGameInfo()Ljava/util/List;")) - private List axolotlclient$replaceGameInfo(List original) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugInfo.get() ? DebugComponents.getLeft() : original; - } - - @Inject(method = "drawGameInfo", at = @At("TAIL"), remap = false) - private void axolotlclient$addBottomLeftColumn(CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugInfo.get()) { - /* renders the bottom left column of debug text, but in the greyish color just like 1.7 */ - final int fontHeight = textRenderer.fontHeight - (OldAnimationsConfig.instance.debugTextSpacing.get() ? 1 : 0); - int top = DebugComponents.getLeft().size() * 10 + 4 /* should be 64, just like 1.7 */; - for (String msg : DebugComponents.getLeftBottom()) { - if (msg == null) continue; - if (!OldAnimationsConfig.instance.disableDebugBackground.get()) { - GuiElement.fill(1, top - 1, 2 + textRenderer.getWidth(msg) + 1, top + fontHeight - 1, -1873784752); - } - textRenderer.draw(msg, 2, top, 14737632, OldAnimationsConfig.instance.debugTextShadow.get()); - top += fontHeight; - } - } - } - - @ModifyExpressionValue(method = "drawSystemInfo", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/DebugOverlay;getSystemInfo()Ljava/util/List;")) - private List axolotlclient$replaceSystemInfo(List original) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugInfo.get() ? DebugComponents.getRight() : original; - } - - @WrapOperation(method = {"drawGameInfo", "drawSystemInfo"}, at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/render/TextRenderer;fontHeight:I")) - private int axolotlclient$changeFontHeight(TextRenderer instance, Operation original) { - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugTextSpacing.get() ? 10 : original.call(instance); - } - - @WrapWithCondition(method = {"drawGameInfo", "drawSystemInfo"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/DebugOverlay;fill(IIIII)V")) - private boolean axolotlclient$removeBackgroundRectangle(int left, int top, int right, int bottom, int color) { - /* disable rendering the rectangular background, just like 1.7 */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableDebugBackground.get(); - } - - @WrapOperation(method = "drawSystemInfo", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/TextRenderer;draw(Ljava/lang/String;III)I")) - private int axolotlclient$addTextShadow(TextRenderer instance, String text, int x, int y, int color, Operation original) { - /* uses the alternative drawString method which allows text shadows, just like in 1.7 */ - return instance.draw(text, x, y, color, OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugTextShadow.get()); - } - - @WrapOperation(method = "drawGameInfo", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/TextRenderer;draw(Ljava/lang/String;III)I")) - private int axolotlclient$addTextShadow2(TextRenderer instance, String text, int x, int y, int color, Operation original) { - /* same as above redirect, but the text is white, just like in 1.7 */ - int textColor = OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugTextColorScheme.get() ? 16777215 : 0xE0E0E0; - return instance.draw(text, x, y, textColor, OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.debugTextShadow.get()); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DisconnectedScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DisconnectedScreenMixin.java deleted file mode 100644 index 8c3a86c53..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/DisconnectedScreenMixin.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.util.GuiLayout; -import net.minecraft.client.gui.screen.DisconnectedScreen; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.render.TextRenderer; -import net.minecraft.client.resource.language.I18n; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(DisconnectedScreen.class) -public class DisconnectedScreenMixin extends Screen { - - @WrapOperation(method = "init", at = @At(value = "NEW", target = "(IIILjava/lang/String;)Lnet/minecraft/client/gui/widget/ButtonWidget;")) - private ButtonWidget axolotlclient$disconnectScreenInit(int i, int j, int k, String string, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disconnectScreen.get()) { - /* reposition the button slightly to match 1.7 */ - k = height / 4 + 120 + 12; - int fontHeight = textRenderer != null ? textRenderer.fontHeight : 9; - k = GuiLayout.moveBelowIfOverlapping(k, 20, height / 2 - 50, fontHeight, 8); - /* this text still exists within the lang file!! */ - string = I18n.translate("gui.toTitle"); - } - return original.call(i, j, k, string); - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/DisconnectedScreen;drawCenteredString(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V", ordinal = 0)) - private void axolotlclient$disconnectScreenRendering(DisconnectedScreen instance, TextRenderer textRenderer, String s, int i, int j, int k, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disconnectScreen.get()) { - /* reposition the text slightly to match 1.7 */ - j = height / 2 - 50; - } - original.call(instance, textRenderer, s, i, j, k); - } - - @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/screen/DisconnectedScreen;textHeight:I", ordinal = 1)) - private int axolotlclient$redirectTextHeight(int original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disconnectScreen.get()) { - /* reposition this other text slightly to match 1.7 */ - original = 60; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameGuiMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameGuiMixin.java deleted file mode 100644 index c4d59890a..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameGuiMixin.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.modules.hud.HudManager; -import io.github.axolotlclient.modules.hud.gui.hud.vanilla.CrosshairHud; -import io.github.axolotlclient.oldanimations.OldAnimations; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.ducks.ILivingEntity; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GameGui; -import net.minecraft.util.math.MathHelper; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(GameGui.class) -public abstract class GameGuiMixin { - - @Shadow - @Final - private Minecraft minecraft; - - @ModifyVariable(method = "renderStatusBars", at = @At(value = "STORE", ordinal = 0), index = 4) - private boolean axolotlclient$useOldHealthLogic(boolean value) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.heartFlashing.get()) { - /* taken straight from 1.7 */ - /* MC-2930 aimed to revert this... MC-73438 wants to bring this back.... there is no winning :/ */ - /* this was originally a bug from 1.3.1 */ - boolean i3 = minecraft.player.getMaxHealth() / 3 % 2 == 1; - if (minecraft.player.getMaxHealth() < 10) { - i3 = false; - } - return i3; - } - return value; - } - - @ModifyExpressionValue(method = "renderStatusBars", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/GameGui;displayHealth:I")) - private int axolotlclient$useLastHealthValue(int value) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.heartFlashing.get()) { - /* this was removed from 1.8... so i added it back :) */ - return MathHelper.ceil(((ILivingEntity) minecraft.player).axolotlclient$getPrevHealth()); - } - return value; - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GameGui;hasCrosshair()Z")) - private boolean axolotlclient$enableCrosshair(GameGui instance, Operation original) { - boolean isCustomCrosshair = OldAnimations.AXOLOTLCLIENT && HudManager.getInstance().get(CrosshairHud.ID).isEnabled(); - return (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.alwaysShowCrosshair.get() && !isCustomCrosshair) || original.call(instance); - } - - @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/GameGui;titleTime:I", ordinal = 0)) - private int axolotlclient$skipTitleRendering(int original) { - /* 1.7 doesn't have titles */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableTitles.get()) { - return 0; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameMenuScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameMenuScreenMixin.java deleted file mode 100644 index c85bc40e3..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GameMenuScreenMixin.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.screen.GameMenuScreen; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(GameMenuScreen.class) -public class GameMenuScreenMixin { - - @WrapOperation(method = "buttonClicked", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;isIntegratedServerRunning()Z")) - private boolean axolotlclient$openTitleScreenAlways(Minecraft instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disconnectServerToTitleScreen.get()) { - /* MC-13057 */ - /* this will send your ass back to the title screen every time u disconnect from a multiplayer server :p */ - return true; - } - return original.call(instance); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GuiElementMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GuiElementMixin.java deleted file mode 100644 index 77b2d349b..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/GuiElementMixin.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.GuiElement; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Mixin(GuiElement.class) -public abstract class GuiElementMixin { - - @ModifyArg(method = "drawString", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/TextRenderer;drawWithShadow(Ljava/lang/String;FFI)I"), index = 0) - private String axolotlclient$spoofTitleVersion(String string, @Local(argsOnly = true, ordinal = 0) int i, @Local(argsOnly = true, ordinal = 2) int k) { - /* an absolutely atrocious hack to get the title version to say 1.7.10. this should be changed one day */ - /* wonder why the client brand is not showing... not my issue i think */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get() && - string.contains("1.8.9") && i == 2 && k == -1 /* this will only target the titlescreen drawString invocation hopefully */) { - string = string.replace("1.8.9", "1.7.10"); - } - return string; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/InventoryMenuScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/InventoryMenuScreenMixin.java deleted file mode 100644 index ea3b6144a..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/InventoryMenuScreenMixin.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.inventory.menu.InventoryMenuScreen; -import net.minecraft.client.gui.screen.inventory.menu.SurvivalInventoryScreen; -import net.minecraft.client.render.platform.GlStateManager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(InventoryMenuScreen.class) -public class InventoryMenuScreenMixin extends Screen { - - //TODO: This implementation is not perfect :( - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/Lighting;turnOff()V", ordinal = 1)) - private void axolotlclient$changeLightingStateChange(Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.inventoryTextLighting.get() && axolotlclient$isValidState()) { - /* weird. MC-16608 */ - GlStateManager.enableLighting(); - } else { - original.call(); - } - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/inventory/menu/InventoryMenuScreen;renderLabels(II)V")) - private void axolotlclient$changeTextColor(InventoryMenuScreen instance, int i, int j, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.inventoryTextLighting.get() && axolotlclient$isInSurvivalInventory()) { - /* this is not the right modification. forgive me :/ */ - //todo: find source - j = 3552822; - } - original.call(instance, i, j); - } - - @WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/Lighting;turnOnGui()V", ordinal = 1)) - private boolean axolotlclient$removeLightingStateChange2() { - /* yup. goodbye */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.inventoryTextLighting.get() || !axolotlclient$isValidState(); - } - - @Unique - private boolean axolotlclient$isValidState() { - /* the bug only affected guis like hoppers and chests. not the survival inventory for some reason?? */ - return minecraft.player.inventory.getCursorItem() != null && !axolotlclient$isInSurvivalInventory(); - } - - @Unique - private boolean axolotlclient$isInSurvivalInventory() { - return ((InventoryMenuScreen)(Object) this instanceof SurvivalInventoryScreen); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingEntryMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingEntryMixin.java deleted file mode 100644 index bf6189efd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingEntryMixin.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.OldButtonWidget; -import net.minecraft.client.gui.screen.options.ControlsListWidget; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.options.KeyBinding; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ControlsListWidget.KeyBindingEntry.class) -public class KeyBindingEntryMixin { - - @Mutable - @Shadow - @Final - private ButtonWidget keyBindingButton; - - @Mutable - @Shadow - @Final - private ButtonWidget resetButton; - - @Inject(method = "(Lnet/minecraft/client/gui/screen/options/ControlsListWidget;Lnet/minecraft/client/options/KeyBinding;)V", at = @At(value = "TAIL")) - private void axolotlclient$oldButtonSize(ControlsListWidget controlsListWidget, KeyBinding keyBinding, CallbackInfo ci) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.controlsListButtonHeight.get()) { - /* MC-70308 */ - /* because of axolotlclient's modifications to the buttonwidget, im sort of forced to create a copy */ - /* of the button widget to use for the controlslistwidget. this new button will have the exact same */ - /* properties as the buttons created before this injection. the only difference is the height like 1.7 */ - /* took me like a week before i realized axolotlclient changed shit. lmfao */ - keyBindingButton = new OldButtonWidget( - keyBindingButton.id, - keyBindingButton.x, keyBindingButton.y, - keyBindingButton.getWidth(), 18, - keyBindingButton.message - ); - resetButton = new OldButtonWidget( - resetButton.id, - resetButton.x, resetButton.y, - resetButton.getWidth(), 18, - resetButton.message - ); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingMixin.java deleted file mode 100644 index e1395f2de..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/KeyBindingMixin.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.options.KeyBinding; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(KeyBinding.class) -public class KeyBindingMixin { - - @ModifyVariable(method = "", at = @At(value = "LOAD", ordinal = 0), index = 3, argsOnly = true) - private static String axolotlclient$changeKeyBindingCategory( - String original, - @Local(ordinal = 0, index = 1, argsOnly = true) String string, - @Local(ordinal = 0, index = 2, argsOnly = true) int i - ) { - /* MC-70305 is the culprit */ - /* honestly this is a very silly injection, but idk a better way */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.moveSprintKeybind.get() && - "key.sprint".equals(string) && i == 29 && "key.categories.movement".equals(original)) { - return "key.categories.gameplay"; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ListWidgetMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ListWidgetMixin.java deleted file mode 100644 index 27ed948d4..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ListWidgetMixin.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.widget.ListWidget; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArgs; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.invoke.arg.Args; - -@Mixin(ListWidget.class) -public abstract class ListWidgetMixin { - - @Shadow - public abstract int getMaxScroll(); - - @Shadow - protected float scrollAmount; - - @Shadow - protected boolean centerAlongY; - - @Inject(method = "capScrolling", at = @At("TAIL")) - private void axolotlclient$allowNonNegativeScrolling(CallbackInfo ci) { - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.centeredSelectionMenus.get()) { - return; - } - int var1 = getMaxScroll(); - if (var1 < 0) { - var1 /= 2; - if (!centerAlongY) { - var1 = 0; - } - } - if (scrollAmount < 0.0F) { - scrollAmount = 0.0F; - } - if (scrollAmount > (float) var1) { - scrollAmount = (float) var1; - } - - //todo: why is this causing a bug. what -// scrollAmount = MathHelper.clamp(scrollAmount, 0.0F, (float) var1); - } - - @ModifyArgs(method = "getMaxScroll", at = @At(value = "INVOKE", target = "Ljava/lang/Math;max(II)I")) - private void axolotlclient$removeNonNegativeRestriction(Args args) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.centeredSelectionMenus.get()) { - args.set(0, args.get(1)); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/OptionsScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/OptionsScreenMixin.java deleted file mode 100644 index 9c2e6092b..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/OptionsScreenMixin.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.expression.Expression; -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import com.llamalad7.mixinextras.sugar.Local; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.options.OptionsScreen; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.options.GameOptions; -import net.minecraft.client.resource.language.I18n; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.world.Difficulty; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; - -import java.util.List; - -@Mixin(OptionsScreen.class /* C_1860331 */) -public abstract class OptionsScreenMixin extends Screen { - - @Shadow - @Final - private GameOptions options; - - @Shadow - private ButtonWidget difficultyButton; - - @Shadow - public abstract String getButtonLabel(Difficulty difficulty); - - @WrapOperation(method = "init", at = @At(value = "INVOKE", target = "Ljava/util/List;add(Ljava/lang/Object;)Z", ordinal = 5)) - private boolean axolotlclient$disableSkinCustomizationButton(List instance, E e, Operation original) { - /* disables the rendering of the skin customization button */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableSkinCustomizationButton.get()) { - return original.call(instance, e); - } else { - return false; - } - } - - @ModifyExpressionValue(method = "init", at = @At(value = "CONSTANT", args = "stringValue=options.chat.title")) - private String axolotlclient$useAlternativeTitle(String original) { - /* for some reason, this text still exist in the game lol */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldMultiplayerSettingsPage.get() ? "options.multiplayer.title" : original; - } - - @WrapOperation(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/world/ClientWorld;getDifficulty()Lnet/minecraft/world/Difficulty;")) - private Difficulty axolotlclient$tryNotToCrashGame(ClientWorld instance, Operation original) { - /* if we don't do this, our game will crash as no valid world is loaded */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - return options.difficulty; - } - return original.call(instance); - } - - @Expression("? != null") - @ModifyExpressionValue(method = "init", at = @At(value = "MIXINEXTRAS:EXPRESSION", ordinal = 0)) - private boolean axolotlclient$skipRealmsNotificationButton(boolean original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* now, the realms notification button will never be rendered. */ - return true; - } - return original; - } - - @ModifyExpressionValue(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;isSingleplayer()Z")) - private boolean axolotlclient$skipLockedDifficultyRendering(boolean original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - /* we might as well skip over this to reduce the amount of work needed to replicate the old difficulty button */ - return false; - } - return original; - } - - @WrapOperation(method = "init", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/gui/widget/ButtonWidget;active:Z", ordinal = 1)) - private void axolotlclient$addHardcoreState(ButtonWidget instance, boolean value, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get()) { - if (minecraft.world != null && minecraft.world.getData().isHardcore()) { - /* because we basically overwrote the original hardcore button code, we should add this :p */ - original.call(instance, value); - instance.message = I18n.translate("options.difficulty") + ": " + I18n.translate("options.difficulty.hardcore"); - } - } else { - original.call(instance, value); - } - } - - @ModifyExpressionValue(method = "buttonClicked", at = @At(value = "CONSTANT", args = "intValue=108")) - private int axolotlclient$updateOptionsDifficulty(int original, @Local(argsOnly = true) ButtonWidget buttonWidget) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.difficultyLogic.get() && - buttonWidget.id == original) { - /* mostly adapted from 1.7. we need to update the difficulty option instead of the world difficulty */ - options.difficulty = Difficulty.byId(options.difficulty.getId() + 1 & 3); - difficultyButton.message = getButtonLabel(options.difficulty); - /* if we don't save, then the difficulty will not be saved if the user quits the game */ - /* i was pulling my hair out for a whole month wondering why the difficulty was not saving properly */ - minecraft.options.save(); - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerInventoryScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerInventoryScreenMixin.java deleted file mode 100644 index 6d0283e56..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerInventoryScreenMixin.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.inventory.menu.PlayerInventoryScreen; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(PlayerInventoryScreen.class) -public class PlayerInventoryScreenMixin { - - @WrapWithCondition(method = "checkStatusEffects", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/gui/screen/inventory/menu/PlayerInventoryScreen;x:I", ordinal = 1)) - private boolean axolotlclient$dontUpdateEffectsHudPos(PlayerInventoryScreen instance, int value) { - /* yeah oops */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.dontUpdateEffectsHud.get(); - } - - @WrapWithCondition(method = "checkStatusEffects", at = @At(value = "FIELD", opcode = Opcodes.PUTFIELD, target = "Lnet/minecraft/client/gui/screen/inventory/menu/PlayerInventoryScreen;hasStatusEffect:Z", ordinal = 1)) - private boolean axolotlclient$dontUpdateEffectsHudPos2(PlayerInventoryScreen instance, boolean value) { - /* buggy ahh menu */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.dontUpdateEffectsHud.get(); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerTabOverlayMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerTabOverlayMixin.java deleted file mode 100644 index 4b1f7b755..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PlayerTabOverlayMixin.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import com.llamalad7.mixinextras.sugar.Local; -import com.llamalad7.mixinextras.sugar.Share; -import com.llamalad7.mixinextras.sugar.ref.LocalIntRef; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiElement; -import net.minecraft.client.gui.overlay.PlayerTabOverlay; -import net.minecraft.client.network.PlayerInfo; -import net.minecraft.client.network.handler.ClientPlayNetworkHandler; -import net.minecraft.scoreboard.ScoreboardObjective; -import net.minecraft.scoreboard.criterion.ScoreboardCriterion; -import net.minecraft.text.Text; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.ModifyVariable; -import org.spongepowered.asm.mixin.injection.Slice; - -import java.util.ArrayList; -import java.util.List; - -@Mixin(PlayerTabOverlay.class /* unmapped name is C_4052762 */) -public abstract class PlayerTabOverlayMixin extends GuiElement { - - @Shadow - @Final - private Minecraft minecraft; - - //TODO: i should audit the code and ensure it's all consistent and good. using shares so often is not a good sign lol - // the bedwars module in axolotlclient may or may not conflict... im not sure... - // there are some locals throwing errors. i think its the mcdev plugin being funny - - @ModifyVariable(method = "render", at = @At("STORE"), index = 9) - private int axolotlclient$captureLocalN(int original, @Share("localRefN") LocalIntRef localRefN) { - /* honestly this could be written better, but, because of the modifications below, */ - /* the value of n changes. we need it to be the original value later on, so we should */ - /* store it for that usage */ - localRefN.set(original); - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 2), index = 9) - private int axolotlclient$leftToRightEntryPopulation(int original, @Local(index = 10) int k) { - /* this local represents the rows per column */ - /* in 1.7, the value used here is the number of columns however */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.rowBasedEntryOrder.get()) { - return k; - } - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 3), index = 9) - private int axolotlclient$leftToRightEntryPopulation2(int original, @Local(index = 10) int k) { - /* ditto */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.rowBasedEntryOrder.get()) { - return k; - } - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 4), index = 9) - private int axolotlclient$useRightLocal(int original, @Share("localRefN") LocalIntRef localRefN) { - /* bro istg. the above modifications kinda mess up the local n. silly mixins */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.rowBasedEntryOrder.get()) { - return localRefN.get(); - } - return original; - } - - @ModifyVariable(method = "render", at = @At("STORE"), index = 20) - private int axolotlclient$captureLocalV(int original, @Share("localRefV") LocalIntRef localRefV) { - /* not again... */ - localRefV.set(original); - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 0), index = 20) - private int axolotlclient$swapLocals(int original, @Local(index = 21) int s) { - /* this local represents the column index */ - /* in 1.7, the local called here is the row index local */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.rowBasedEntryOrder.get()) { - return s; - } - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 1), index = 21) - private int axolotlclient$swapLocals2(int original, @Share("localRefV") LocalIntRef localRefV) { - /* this local represents the row index */ - /* in 1.7, the local called here is the column index local */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.rowBasedEntryOrder.get()) { - return localRefV.get(); - } - return original; - } - - @ModifyVariable(method = "render", at = @At("STORE")) - private List axolotlclient$doNotSortList(List original, @Local ClientPlayNetworkHandler clientPlayNetworkHandler) { - /* 1.7 does not sort the players. we should just convert the online player map to an array list */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.dontSortTabEntries.get()) { - return new ArrayList<>(clientPlayNetworkHandler.getOnlinePlayers()); - } - return original; - } - - @ModifyVariable(method = "render", at = @At("LOAD"), index = 6, ordinal = 1) - private int axolotlclient$useOldObjectivesPositionLogic(int original, @Local(index = 25) String string2) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldObjectivesPosition.get()) { - /* taken from 1.7 */ - return minecraft.textRenderer.getWidth(string2) + 4; - } - return original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 0), index = 27) - private int axolotlclient$useOldObjectivesPositionLogic2(int original, @Local(index = 22) int v, @Share("localRefAc") LocalIntRef localRefAc) { - /* storing the original value for later use */ - localRefAc.set(original); - /* we need to solely use the player name/head position to determine the placement of the objective number like 1.7 */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldObjectivesPosition.get() ? v : original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 1), index = 27) - private int axolotlclient$undoModifyVariableAbove(int original, @Share("localRefAc") LocalIntRef localRefAc) { - /* yep as described in the name, we need to revert the modification done above :p */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldObjectivesPosition.get() ? localRefAc.get() : original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD", ordinal = 1), index = 12) - private int axolotlclient$useOldObjectivesPositionLogic3(int original, @Local(index = 13) int o) { - /* rahh */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.oldObjectivesPosition.get() ? o - 17 : original; - } - - @ModifyExpressionValue(method = "render", at = @At(value = "CONSTANT", args = "intValue=90")) - private int axolotlclient$skipRenderingHeartsSpace(int original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.hideScoreboardHearts.get()) { - return 0; - } - return original; - } - - @WrapOperation(method = "renderDisplayScore", at = @At(value = "INVOKE", target = "Lnet/minecraft/scoreboard/ScoreboardObjective;getRenderType()Lnet/minecraft/scoreboard/criterion/ScoreboardCriterion$RenderType;")) - private ScoreboardCriterion.RenderType axolotlclient$skipRenderingHearts(ScoreboardObjective instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.hideScoreboardHearts.get()) { - /* yep. no more hearts woo */ - return ScoreboardCriterion.RenderType.INTEGER; - } - return original.call(instance); - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Ljava/util/List;size()I", ordinal = 1)) - private int axolotlclient$replacePlayerListSize(List instance, Operation original) { - /* renders a fixed amount of player slots just like 1.7 */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? minecraft.getNetworkHandler().maxPlayerCount : original.call(instance); - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Ljava/util/List;subList(II)Ljava/util/List;")) - private List axolotlclient$dontModifyPlayerList(List list, int fromIndex, int toIndex, Operation> original) { - /* don't modify the list just like 1.7 */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? list : original.call(list, fromIndex, toIndex); - } - - @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(II)I", ordinal = 1)) - private int axolotlclient$staticSlotWidth(int a, int b, Operation original) { - /* makes the slot width static just like 1.7 */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? 300 : original.call(a, b); - } - - @ModifyVariable(method = "render", at = @At("STORE"), index = 13) - private int axolotlclient$capSlotWidth(int value) { - /* caps the slot width just like 1.7 */ - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() && value > 150) { - value = 150; - } - return value; - } - - @ModifyExpressionValue( - method = "render", - at = @At(value = "CONSTANT", args = "intValue=5"), - slice = @Slice( - from = @At(value = "INVOKE", target = "Lnet/minecraft/scoreboard/ScoreboardObjective;getRenderType()Lnet/minecraft/scoreboard/criterion/ScoreboardCriterion$RenderType;", ordinal = 1), - to = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/PlayerTabOverlay;fill(IIIII)V", ordinal = 2) - )) - private int axolotlclient$removeBackgroundSpace(int constant) { - /* cancels spacing */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? 0 : constant; - } - - @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/overlay/PlayerTabOverlay;header:Lnet/minecraft/text/Text;", ordinal = 0)) - private Text axolotlclient$disableHeaderElement(Text original) { - /* disables the tab header */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableTabHeader.get() ? null : original; - } - - @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/overlay/PlayerTabOverlay;footer:Lnet/minecraft/text/Text;", ordinal = 0)) - private Text axolotlclient$disableFooterElement(Text original) { - /* disables the tab footer */ - return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableTabFooter.get() ? null : original; - } - - @ModifyVariable(method = "render", at = @At("STORE"), index = 11) - private boolean axolotlclient$disablePlayerHeads(boolean original) { - /* disables the rendering of player heads */ - return (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableTabPlayerHeads.get()) && original; - } - - @ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/PlayerTabOverlay;fill(IIIII)V"), index = 2) - private int axolotlclient$removeExtraPixels(int par1) { - /* corrects for an extra column of pixels added in 1.8+ */ - return par1 - (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? 1 : 0); - } - - @ModifyArg(method = "renderPing", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/overlay/PlayerTabOverlay;drawTexture(IIIIII)V"), index = 1) - private int axolotlclient$movePingElement(int par1) { - /* move the ping element */ - return par1 - (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tabDimensions.get() ? 1 : 0); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PresetsScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PresetsScreenMixin.java deleted file mode 100644 index 69aedf591..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/PresetsScreenMixin.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Blocks; -import net.minecraft.block.TallPlantBlock; -import net.minecraft.client.gui.screen.PresetsScreen; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(PresetsScreen.class) -public class PresetsScreenMixin { - - @ModifyVariable(method = "addFlatWorldPreset(Ljava/lang/String;Lnet/minecraft/item/Item;ILnet/minecraft/world/biome/Biome;Ljava/util/List;[Lnet/minecraft/world/gen/chunk/FlatWorldLayer;)V", at = @At("HEAD"), argsOnly = true) - private static Item axolotlclient$waterWorldPresetIcon(Item original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.customizeWorldPresetIcons.get() && original == Items.WATER_BUCKET) { - /* this should be flowing water, however, still water uses the same model in 1.7 sooooo */ - return Item.byBlock(Blocks.FLOWING_WATER); - } - return original; - } - - @ModifyVariable(method = "addFlatWorldPreset(Ljava/lang/String;Lnet/minecraft/item/Item;ILnet/minecraft/world/biome/Biome;Ljava/util/List;[Lnet/minecraft/world/gen/chunk/FlatWorldLayer;)V", at = @At("HEAD"), argsOnly = true) - private static int axolotlclient$useDeadBushId(int original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.customizeWorldPresetIcons.get() && original == TallPlantBlock.Type.GRASS.getId()) { - return TallPlantBlock.Type.DEAD_BUSH.getId(); - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackEntryMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackEntryMixin.java deleted file mode 100644 index 82b5bd7cd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackEntryMixin.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.resourcepack.ResourcePackEntry; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(ResourcePackEntry.class) -public class ResourcePackEntryMixin { - - @WrapOperation(method = { "render", "mouseClicked" }, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/resourcepack/ResourcePackEntry;getFormat()I")) - private int axolotlclient$removePackFormatWarning(ResourcePackEntry instance, Operation original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.packFormatWarning.get()) { - /* this will make all packs, including incompatible ones, appear to be compatible */ - return 1; - } - return original.call(instance); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackScreenMixin.java deleted file mode 100644 index a2ccc3ea6..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ResourcePackScreenMixin.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.ResourcePacksScreen; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(ResourcePacksScreen.class) -public class ResourcePackScreenMixin { - - @ModifyExpressionValue(method = "init", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/screen/ResourcePacksScreen;changed:Z")) - private boolean axolotlclient$refreshResourcesWhenDone(boolean original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.refreshResourcesRegardless.get()) { - return false; - } - return original; - } - - @ModifyExpressionValue(method = "buttonClicked", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/gui/screen/ResourcePacksScreen;changed:Z")) - private boolean axolotlclient$refreshResourcesWhenDone2(boolean original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.refreshResourcesRegardless.get()) { - return true; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ServerListEntryWidgetMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ServerListEntryWidgetMixin.java deleted file mode 100644 index 2f71b888f..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/ServerListEntryWidgetMixin.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.widget.ServerListEntryWidget; -import net.minecraft.resource.Identifier; -import org.objectweb.asm.Opcodes; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -@Mixin(ServerListEntryWidget.class) -public abstract class ServerListEntryWidgetMixin { - - @WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/widget/ServerListEntryWidget;drawIcon(IILnet/minecraft/resource/Identifier;)V", ordinal = 1)) - private boolean axolotlclient$disableUnknownServerIcon(ServerListEntryWidget instance, int i, int j, Identifier identifier) { - /* disables the rendering of the unknown server icon */ - return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableUnknownServerIcon.get(); - } - - @ModifyExpressionValue(method = "render", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/options/GameOptions;touchscreen:Z")) - private boolean axolotlclient$disableSelectionButtons(boolean original) { - /* disables the rendering of the server selection buttons */ - return (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableServerSelectionButtons.get()) && original; - } - - @ModifyVariable(method = "render", at = @At(value = "LOAD"), ordinal = 0, index = 8, argsOnly = true) - private boolean axolotlclient$disableSelectionButtons2(boolean value) { - /* disables the rendering of the server selection buttons again */ - return (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.disableServerSelectionButtons.get()) && value; - } - - @ModifyVariable(method = "mouseClicked", at = @At(value = "LOAD", ordinal = 0), ordinal = 4, index = 5, argsOnly = true) - private int axolotlclient$disableSelectionButtons3(int value) { - /* disables the functionality of the server selection buttons */ - return value + (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.disableServerSelectionButtons.get() ? 32 : 0); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/SurvivalInventoryScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/SurvivalInventoryScreenMixin.java deleted file mode 100644 index 5086102dd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/SurvivalInventoryScreenMixin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.inventory.menu.SurvivalInventoryScreen; -import net.minecraft.client.render.entity.EntityRenderDispatcher; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(SurvivalInventoryScreen.class) -public abstract class SurvivalInventoryScreenMixin { - - @WrapOperation(method = "renderEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/EntityRenderDispatcher;setRenderShadow(Z)V")) - private static void axolotlclient$disableShadowCheck(EntityRenderDispatcher instance, boolean renderShadow, Operation original) { - /* MC-47442 */ - /* hello darkness my old friend */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.showShadowInInventory.get()) { - original.call(instance, renderShadow); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/VideoOptionsScreenMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/VideoOptionsScreenMixin.java deleted file mode 100644 index 42d23cacb..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/gui/VideoOptionsScreenMixin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.gui; - -import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.gui.screen.VideoOptionsScreen; -import org.spongepowered.asm.mixin.Dynamic; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(VideoOptionsScreen.class) -public class VideoOptionsScreenMixin { - - @Dynamic("Spoof OptiFine Minecraft version") - @ModifyExpressionValue(method = "render", at = @At(value = "CONSTANT", args = "stringValue=Minecraft 1.8.9"), require = 0) - private String axolotlclient$spoofOptiFineMinecraftVersion(String original) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get()) { - /* hopefully optifine doesnt have 1.8.9 anywhere else */ - return "Minecraft 1.7.10"; - } - return original; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/AbstractArmorLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/AbstractArmorLayerMixin.java deleted file mode 100644 index bee57617a..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/AbstractArmorLayerMixin.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.mixin.LivingEntityRendererAccessor; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.LivingEntityRenderer; -import net.minecraft.client.render.entity.layer.AbstractArmorLayer; -import net.minecraft.client.render.model.Model; -import net.minecraft.entity.living.LivingEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(AbstractArmorLayer.class) -public abstract class AbstractArmorLayerMixin { - - @Shadow - @Final - private LivingEntityRenderer parent; - - @Shadow - public abstract Model getModel(int i); - - @Inject(method = "renderArmor", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(LivingEntity entity, float handSwingAmount, float handSwing, float tickDelta, float age, float headYaw, float headPitch, float scale, int equipmentSlot, CallbackInfo ci) { - /* colors the armor pieces red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(entity, tickDelta)) { - getModel(equipmentSlot).render(entity, handSwingAmount, handSwing, age, headYaw, headPitch, scale); - DamageTint.unsetDamageTint(); - } - } - - @Inject(method = "renderArmor", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightnessAlternative(LivingEntity entity, float handSwingAmount, float handSwing, float tickDelta, float age, float headYaw, float headPitch, float scale, int equipmentSlot, CallbackInfo ci) { - /* colors the armor pieces red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.separateDamageTintFromGlint.get() || OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((LivingEntityRendererAccessor) parent).invokeSetupOverlayColor(entity, tickDelta, true)) { - getModel(equipmentSlot).render(entity, handSwingAmount, handSwing, age, headYaw, headPitch, scale); - ((LivingEntityRendererAccessor) parent).invokeTearDownOverlayColor(); - } - } - - @Inject(method = "colorsWhenDamaged", at = @At("HEAD"), cancellable = true) - private void axolotlclient$applyDamageColor(CallbackInfoReturnable callback) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.secondLayerDamageTint.get() && !OldAnimationsConfig.instance.damageTintColor.get() && !OldAnimationsConfig.instance.separateDamageTintFromGlint.get()) { - /* enables coloring the second layer in 1.8 */ - callback.setReturnValue(true); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EnderDragonEyesLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EnderDragonEyesLayerMixin.java deleted file mode 100644 index 0509c49d7..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EnderDragonEyesLayerMixin.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.EnderDragonRenderer; -import net.minecraft.client.render.entity.layer.EnderDragonEyesLayer; -import net.minecraft.entity.living.mob.monster.boss.EnderDragonEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(EnderDragonEyesLayer.class) -public abstract class EnderDragonEyesLayerMixin { - - @Shadow - @Final - private EnderDragonRenderer parent; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/monster/boss/EnderDragonEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(EnderDragonEntity enderDragonEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(enderDragonEntity, h)) { - parent.getModel().render(enderDragonEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EndermanEyesLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EndermanEyesLayerMixin.java deleted file mode 100644 index 57b169919..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/EndermanEyesLayerMixin.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.EndermanRenderer; -import net.minecraft.client.render.entity.layer.EndermanEyesLayer; -import net.minecraft.entity.living.mob.monster.EndermanEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(EndermanEyesLayer.class) -public abstract class EndermanEyesLayerMixin { - - @Shadow - @Final - private EndermanRenderer parent; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/monster/EndermanEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(EndermanEntity endermanEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(endermanEntity, h)) { - parent.getModel().render(endermanEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } - - @Inject(method = "colorsWhenDamaged", at = @At("HEAD"), cancellable = true) - private void axolotlclient$applyDamageColor(CallbackInfoReturnable callback) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.secondLayerDamageTint.get() && !OldAnimationsConfig.instance.damageTintColor.get()) { - /* enables coloring the second layer in 1.8 */ - callback.setReturnValue(true); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/PigSaddleLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/PigSaddleLayerMixin.java deleted file mode 100644 index 90529d597..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/PigSaddleLayerMixin.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.PigRenderer; -import net.minecraft.client.render.entity.layer.PigSaddleLayer; -import net.minecraft.client.render.model.entity.PigModel; -import net.minecraft.entity.living.mob.passive.animal.PigEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(PigSaddleLayer.class) -public abstract class PigSaddleLayerMixin { - - @Shadow - @Final - private PigModel model; - - @Shadow - @Final - private PigRenderer parent; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/passive/animal/PigEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/entity/PigModel;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(PigEntity pigEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(pigEntity, h)) { - model.render(pigEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } - - @Inject(method = "colorsWhenDamaged", at = @At("HEAD"), cancellable = true) - private void axolotlclient$applyDamageColor(CallbackInfoReturnable callback) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.secondLayerDamageTint.get() && !OldAnimationsConfig.instance.damageTintColor.get()) { - /* enables coloring the second layer in 1.8 */ - callback.setReturnValue(true); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SheepFurLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SheepFurLayerMixin.java deleted file mode 100644 index d666fc039..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SheepFurLayerMixin.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.SheepRenderer; -import net.minecraft.client.render.entity.layer.SheepFurLayer; -import net.minecraft.client.render.model.entity.SheepFurModel; -import net.minecraft.entity.living.mob.passive.animal.SheepEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(SheepFurLayer.class) -public abstract class SheepFurLayerMixin { - - @Shadow - @Final - private SheepRenderer parent; - - @Shadow - @Final - private SheepFurModel model; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/passive/animal/SheepEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/entity/SheepFurModel;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(SheepEntity sheepEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(sheepEntity, h)) { - model.render(sheepEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SlimeOuterLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SlimeOuterLayerMixin.java deleted file mode 100644 index 29e7a7bcd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SlimeOuterLayerMixin.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.SlimeRenderer; -import net.minecraft.client.render.entity.layer.SlimeOuterLayer; -import net.minecraft.client.render.model.Model; -import net.minecraft.entity.living.mob.monster.SlimeEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(SlimeOuterLayer.class) -public abstract class SlimeOuterLayerMixin { - - @Shadow - @Final - private SlimeRenderer parent; - - @Shadow - @Final - private Model model; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/monster/SlimeEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(SlimeEntity slimeEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(slimeEntity, h)) { - model.render(slimeEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SpiderEyesLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SpiderEyesLayerMixin.java deleted file mode 100644 index c55c71a32..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/SpiderEyesLayerMixin.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.SpiderRenderer; -import net.minecraft.client.render.entity.layer.SpiderEyesLayer; -import net.minecraft.entity.living.mob.monster.SpiderEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(SpiderEyesLayer.class) -public abstract class SpiderEyesLayerMixin { - - @Shadow - @Final - private SpiderRenderer parent; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/monster/SpiderEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(SpiderEntity spiderEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.secondLayerDamageTint.get() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(spiderEntity, h)) { - parent.getModel().render(spiderEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } - - @Inject(method = "colorsWhenDamaged", at = @At("HEAD"), cancellable = true) - private void axolotlclient$applyDamageColor(CallbackInfoReturnable callback) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.secondLayerDamageTint.get() && !OldAnimationsConfig.instance.damageTintColor.get()) { - /* enables coloring the second layer in 1.8 */ - callback.setReturnValue(true); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WolfCollarLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WolfCollarLayerMixin.java deleted file mode 100644 index e50601302..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WolfCollarLayerMixin.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.mixin.mob_layers; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import io.github.axolotlclient.oldanimations.util.DamageTint; -import io.github.axolotlclient.oldanimations.util.IDamageTint; -import net.minecraft.client.render.entity.WolfRenderer; -import net.minecraft.client.render.entity.layer.WolfCollarLayer; -import net.minecraft.entity.living.mob.passive.animal.tameable.WolfEntity; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(WolfCollarLayer.class) -public abstract class WolfCollarLayerMixin { - - @Shadow - @Final - private WolfRenderer parent; - - @Inject(method = "render(Lnet/minecraft/entity/living/mob/passive/animal/tameable/WolfEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/Model;render(Lnet/minecraft/entity/Entity;FFFFFF)V", shift = At.Shift.AFTER)) - private void axolotlclient$addDamageBrightness(WolfEntity wolfEntity, float f, float g, float h, float i, float j, float k, float l, CallbackInfo ci) { - /* colors the entity's layer red just like 1.7 */ - if (!OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.damageTintColor.get()) { - return; - } - if (((IDamageTint) parent).axolotlclient$setupOverlayColor(wolfEntity, h)) { - parent.getModel().render(wolfEntity, f, g, i, j, k, l); - DamageTint.unsetDamageTint(); - } - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WornSkullLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WornSkullLayerMixin.java index 7049a3fe6..6df61db2d 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WornSkullLayerMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WornSkullLayerMixin.java @@ -25,8 +25,6 @@ import net.minecraft.entity.living.LivingEntity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(WornSkullLayer.class) public class WornSkullLayerMixin { @@ -41,11 +39,4 @@ public class WornSkullLayerMixin { return original.call(instance); } - @Inject(method = "colorsWhenDamaged", at = @At("HEAD"), cancellable = true) - private void axolotlclient$removeDamageColor(CallbackInfoReturnable callback) { - if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.noSkullLayerDamageTint.get()) { - /* disables coloring the second layer just like 1.7 */ - callback.setReturnValue(false); - } - } } diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/CustomTextureAtlasSprite.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/CustomTextureAtlasSprite.java deleted file mode 100644 index 270e3c183..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/CustomTextureAtlasSprite.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.render.texture.TextureAtlasSprite; - -/* we need to negate one of the texture coords just like 1.7 did for the glint */ -public final class CustomTextureAtlasSprite extends TextureAtlasSprite { - public static final CustomTextureAtlasSprite INSTANCE = new CustomTextureAtlasSprite(); - - private CustomTextureAtlasSprite() { - super(null); - } - - @Override - public float getU(double u) { - return (float) (-u / 16.0); - } - - @Override - public float getV(double v) { - return (float) (v / 16.0); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DamageTint.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DamageTint.java deleted file mode 100644 index c16838329..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DamageTint.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.render.platform.GlStateManager; - -import java.nio.FloatBuffer; - -public class DamageTint { - - /* methods are both adapted from 1.7 */ - - public static void setDamageTint(FloatBuffer buffer) { - Minecraft.getInstance().gameRenderer.disableLightMap(); - GlStateManager.disableTexture(); - GlStateManager.disableAlphaTest(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(770, 771); - GlStateManager.depthFunc(514); - GlStateManager.color4f(buffer.get(0), buffer.get(1), buffer.get(2), buffer.get(3) + 0.1f /* matches 1.7 */); - } - - public static void unsetDamageTint() { - GlStateManager.depthFunc(515); - GlStateManager.disableBlend(); - GlStateManager.enableAlphaTest(); - GlStateManager.enableTexture(); - Minecraft.getInstance().gameRenderer.enableLightMap(); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DebugComponents.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DebugComponents.java deleted file mode 100644 index 6ef63fae9..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/DebugComponents.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.client.Minecraft; -import net.minecraft.client.render.GameRenderer; -import net.minecraft.client.render.world.RenderChunk; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.LightType; -import net.minecraft.world.chunk.WorldChunk; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - -public final class DebugComponents { - - private static final Minecraft mc = Minecraft.getInstance(); - - public static List getLeft() { - List list = new ArrayList<>(); - /* gotta make sure it all matches haha */ - list.add("Minecraft " + (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.show1_7_10.get() ? "1.7.10" : "1.8.9") + " (" + Minecraft.getCurrentFps() + " fps, " + RenderChunk.updateCounter + " chunk updates)"); - list.add(mc.worldRenderer.getChunkDebugInfo()); /* this will return different data than in 1.7 unfortunately */ - list.add(mc.worldRenderer.getEntityDebugInfo()); - list.add("P: " + mc.particleManager.getDebugInfo() + ". T: " + mc.world.getDebugInfo()); - list.add(mc.world.getChunkSourceDebugInfo()); - list.add(""); - return list; - } - - /* this code was converted from kotlin to java. i am too lazy to make this readable tbh */ - public static List getLeftBottom() { - BlockPos blockpos = new BlockPos(mc.getCamera().x, mc.getCamera().getShape().minY, mc.getCamera().z); - Entity entity = mc.getCamera(); - Direction enumfacing = entity.getHorizontalFacing(); - WorldChunk chunk = mc.world.getChunk(blockpos); - List list = new ArrayList<>(); - double playerPosX = mc.player.x; - double playerPosY = mc.player.y; - double playerPosZ = mc.player.z; - String var13 = "x: %.5f (%d) // c: %d (%d)"; - Object[] var14 = new Object[]{playerPosX, MathHelper.floor(playerPosX), MathHelper.floor(playerPosX) >> 4, MathHelper.floor(playerPosX) & 15}; - list.add(String.format(var13, Arrays.copyOf(var14, var14.length))); - var13 = "y: %.3f (feet pos, %.3f eyes pos)"; - /* this eyeheight stuff is actually directly a fix for MC-51150... */ - var14 = new Object[]{mc.player.getShape().minY, playerPosY + PlayerUtil.INSTANCE.getEyeHeight()}; - list.add(String.format(var13, Arrays.copyOf(var14, var14.length))); - var13 = "z: %.5f (%d) // c: %d (%d)"; - var14 = new Object[]{playerPosZ, MathHelper.floor(playerPosZ), MathHelper.floor(playerPosZ) >> 4, MathHelper.floor(playerPosZ) & 15}; - list.add(String.format(var13, Arrays.copyOf(var14, var14.length))); - StringBuilder var32 = (new StringBuilder()).append("f: ").append(MathHelper.floor((double)(mc.player.yaw * 4.0F / 360.0F) + (double)0.5F) & 3).append(" ("); - String enumfacingString = enumfacing.toString(); - enumfacingString = enumfacingString.toUpperCase(Locale.ROOT); - list.add(var32.append(enumfacingString).append(") / ").append(MathHelper.wrapDegrees(mc.player.yaw)).toString()); - - try { - int light = chunk.getLight(blockpos, 0); - String biomeName = chunk.getBiome(blockpos, mc.world.getBiomeSource()).name; - int blockLight = chunk.getLight(LightType.BLOCK, blockpos); - int skyLight = chunk.getLight(LightType.SKY, blockpos); - list.add("lc: " + light + " b: " + biomeName + " bl: " + blockLight + " sl: " + skyLight + " rl: " + light); - } catch (Exception e) { - /* yeah, in 1.7, this actually is empty when ur in the void LMFAO */ - list.add(""); - } - - String var17 = "ws: %.3f, fs: %.3f, g: %b, fl: %.0f"; - Object[] var18 = new Object[]{mc.player.abilities.getWalkSpeed(), mc.player.abilities.getFlySpeed(), mc.player.onGround, playerPosY}; - String var33 = String.format(var17, Arrays.copyOf(var18, var18.length)); - list.add(var33); - GameRenderer gameRenderer = mc.gameRenderer; - if (gameRenderer != null) { - gameRenderer = gameRenderer.hasShader() ? gameRenderer : null; - if (gameRenderer != null) { - list.add("shader: " + gameRenderer.getShader().getName()); - } - } - return list; - } - - public static List getRight() { - Runtime runtime = Runtime.getRuntime(); - long maxMemory = runtime.maxMemory(); - long totalMemory = runtime.totalMemory(); - long freeMemory = runtime.freeMemory(); - long usedMemory = totalMemory - freeMemory; - long usedMemoryMb = bytesToMb(usedMemory); - long maxMemoryMb = bytesToMb(maxMemory); - long totalMemoryMb = bytesToMb(totalMemory); - List list = new ArrayList<>(); - list.add("Used memory: " + usedMemory * 100L / maxMemory + "% (" + usedMemoryMb + "MB) of " + maxMemoryMb + "MB"); - list.add("Allocated memory: " + totalMemory * 100L / maxMemory + "% (" + totalMemoryMb + "MB)"); - list.add(""); - return list; - } - - private static long bytesToMb(long bytes) { - return bytes / 1024L / 1024L; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintHandler.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintHandler.java deleted file mode 100644 index 3f84ff48a..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.resource.model.BakedModel; -import net.minecraft.client.resource.model.BasicBakedModel; - -import java.util.HashMap; - -public final class GlintHandler { - - private static final HashMap glintMap = new HashMap<>(); - - /* custom glint model */ - public static BakedModel getModel(BakedModel model) { - /* because we're creating new bakedmodels for the sole purpose of recreating the 1.7 enchantment glint, */ - /* we should reuse the common glint bakedmodels to reduce any crazy memory usage */ - /* redth is my hero */ - return glintMap.computeIfAbsent( - new HashedModel(model), key -> - new BasicBakedModel.Builder(model, CustomTextureAtlasSprite.INSTANCE).build() - ); - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintQuadModel.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintQuadModel.java deleted file mode 100644 index a5d287d32..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/GlintQuadModel.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.render.model.block.ModelTransformations; -import net.minecraft.client.render.texture.TextureAtlasSprite; -import net.minecraft.client.resource.model.BakedModel; -import net.minecraft.client.resource.model.BakedQuad; -import net.minecraft.util.math.Direction; - -import java.util.Collections; -import java.util.List; - -/* this class is pretty much unnecessary. i made it for fun >:D */ -/* it was my attempt at porting the 1.7 gui glint rendering code to the 1.8 model system */ -public class GlintQuadModel implements BakedModel { - private final BakedQuad quad; - - public GlintQuadModel(float speed, float skew) { - /* in 1.7, the height and width are both 20 which are both divided by 16 x 16 */ - float dimension = 20.0F / 256.0F; - /* these position and uv values were taken from 1.7 */ - float[] verts = { - -0.5F, -0.25F, 0.0F, speed + dimension * skew, dimension, - 0.5F, -0.25F, 0.0F, speed + dimension + dimension * skew, dimension, - 0.5F, 0.75F, 0.0F, speed + dimension, 0.0F, - -0.5F, 0.75F, 0.0F, speed, 0.0F - }; - /* we need to match the BLOCK_NORMALS vertex format */ - /* we already have 4 * 5 array, but we need 4 * 7 */ - int[] data = new int[28]; - for (int i = 0; i < 4; i++) { - int src = i * 5; /* where to read from */ - int dst = i * 7; /* where to write to */ - data[dst] = Float.floatToRawIntBits(verts[src]); - data[dst + 1] = Float.floatToRawIntBits(verts[src + 1]); - data[dst + 2] = Float.floatToRawIntBits(verts[src + 2]); - data[dst + 4] = Float.floatToRawIntBits(verts[src + 3]); - data[dst + 5] = Float.floatToRawIntBits(verts[src + 4]); - /* skipping 3 and 6 because they're overwritten by the item renderer */ - } - /* tint index doesn't matter. having the glint on the SOUTH face ensures compatibility with our own culling */ - quad = new BakedQuad(data, -1, Direction.SOUTH); - } - - @Override public List getQuads(Direction direction) { - return Collections.emptyList(); - } - - @Override public List getQuads() { - /* we literally have 1 singular quad sitting in here. */ - /* the end result is just a rectangle which is our glint */ - return Collections.singletonList(quad); - } - - @Override public boolean useAmbientOcclusion() { - return false; - } - - @Override public boolean isGui3d() { - return false; - } - - @Override public boolean isCustomRenderer() { - return false; - } - - @Override public TextureAtlasSprite getParticleIcon() { - return null; - } - - @Override public ModelTransformations getTransformations() { - return ModelTransformations.NONE; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/HashedModel.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/HashedModel.java deleted file mode 100644 index 22d68f6cb..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/HashedModel.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.resource.model.BakedModel; -import net.minecraft.client.resource.model.BakedQuad; -import net.minecraft.util.math.Direction; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -/* this should ensure that our glint model is reused to ensure good performance */ -public final class HashedModel { - private final int[] data; - - public HashedModel(int[] data) { - this.data = Objects.requireNonNull(data, "data cannot be null"); - } - - public HashedModel(BakedModel model) { - List allQuads = new ArrayList<>(); - - for (Direction face : Direction.values()) { - List faceQuads = model.getQuads(face); - if (faceQuads != null) { - allQuads.addAll(faceQuads); - } - } - - List generalQuads = model.getQuads(); - if (generalQuads != null) { - allQuads.addAll(generalQuads); - } - - int[] buffer = new int[allQuads.size() * 3]; - int idx = 0; - for (BakedQuad quad : allQuads) { - int[] vertices = quad.getVertices(); - int limit = Math.min(3, vertices.length); - for (int v = 0; v < limit; v++) { - buffer[idx++] = vertices[v]; - } - } - - /* trim if any quad had fewer than 3 vertex components */ - this.data = (idx == buffer.length) ? buffer : Arrays.copyOf(buffer, idx); - } - - public HashedModel copy(int[] newData) { - return new HashedModel(newData); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } else if (!(o instanceof HashedModel)) { - return false; - } else { - return Arrays.equals(data, ((HashedModel) o).data); - } - } - - @Override - public int hashCode() { - return Arrays.hashCode(data); - } - - @Override - public String toString() { - return "HashedModel(data=" + Arrays.toString(data) + ")"; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/IDamageTint.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/IDamageTint.java deleted file mode 100644 index 30947d6ab..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/IDamageTint.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.entity.living.LivingEntity; - -public interface IDamageTint { - - /* we need an easy way to use the damage overlay in other classes :p */ - boolean axolotlclient$setupOverlayColor (LivingEntity entity, float tickDelta); -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/MobUtil.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/MobUtil.java deleted file mode 100644 index a370e49b3..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/MobUtil.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.living.mob.SnowGolemEntity; -import net.minecraft.entity.living.mob.monster.*; -import net.minecraft.entity.living.mob.monster.boss.WitherEntity; -import net.minecraft.entity.living.mob.passive.animal.ChickenEntity; -import net.minecraft.entity.living.mob.passive.animal.tameable.OcelotEntity; - -public class MobUtil { - public static MobUtil INSTANCE = new MobUtil(); - - /* 14w06a changed mob hitbox sizes */ - - public float oldMobWidth(Entity entity, float width) { - if (entity instanceof SnowGolemEntity && width == 0.7F) { - return 0.4F; - } - if (entity instanceof SilverfishEntity && width == 0.4F) { - return 0.3F; - } - if (entity instanceof SlimeEntity) { - /* the width is dependent on the scale */ - /* so we can't really check the width easily */ - return width / 0.51000005F * 0.6F; - } - if (entity instanceof ChickenEntity && width == 0.4F) { - return 0.3F; - } - return width; - } - - public float oldMobHeight(Entity entity, float height) { - if (entity instanceof SnowGolemEntity && height == 1.9F) { - return 1.8F; - } - if (entity instanceof SilverfishEntity && height == 0.3F) { - return 0.7F; - } - if (entity instanceof SlimeEntity) { - /* the height is dependent on the scale */ - /* so we can't really check the height easily */ - return height / 0.51000005F * 0.6F; - } - if (entity instanceof WitherEntity && height == 3.5F) { - return 4.0F; - } - if (entity instanceof OcelotEntity && height == 0.7F) { - return 0.8F; - } - if ((entity instanceof ZombieEntity || entity instanceof WitchEntity || entity instanceof SkeletonEntity) && - height == 1.95F) { - return 1.8F; - } - if (entity instanceof SkeletonEntity && height == 2.535F) { - /* wither skeleton */ - return 2.34F; - } - return height; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OldButtonWidget.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OldButtonWidget.java deleted file mode 100644 index 91de4c2c7..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OldButtonWidget.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.render.TextRenderer; -import net.minecraft.client.render.platform.GlStateManager; - -public class OldButtonWidget extends ButtonWidget { - - public OldButtonWidget(int i, int j, int k, int l, int m, String string) { - super(i, j, k, l, m, string); - } - - @Override - public void render(Minecraft minecraft, int i, int j) { - /* axolotlclient actually fixes some issues with the button rendering */ - /* i want those issues tho :p they're important to be 1:1 with 1.7 */ - if (visible) { - TextRenderer textRenderer = minecraft.textRenderer; - minecraft.getTextureManager().bind(WIDGETS_LOCATION); - GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); - hovered = i >= x && j >= y && i < x + width && j < y + height; - int k = getYImage(hovered); - GlStateManager.enableBlend(); - GlStateManager.blendFuncSeparate(770, 771, 1, 0); - GlStateManager.blendFunc(770, 771); - drawTexture(x, y, 0, 46 + k * 20, width / 2, height); - drawTexture(x + width / 2, y, 200 - width / 2, 46 + k * 20, width / 2, height); - renderBackground(minecraft, i, j); - int l = 14737632; - if (!active) { - l = 10526880; - } else if (hovered) { - l = 16777120; - } - drawCenteredString(textRenderer, message, x + width / 2, y + (height - 8) / 2, l); - } - } - -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OpaqueLeavesHandler.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OpaqueLeavesHandler.java deleted file mode 100644 index caacd19dd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/OpaqueLeavesHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -import net.minecraft.block.AbstractLeavesBlock; -import net.minecraft.block.Block; -import net.minecraft.block.Leaves2Block; -import net.minecraft.block.LeavesBlock; -import net.minecraft.block.state.BlockState; -import net.minecraft.client.render.block.BlockLayer; - -public class OpaqueLeavesHandler { - - public static boolean isOpaqueLeavesBlock(Block block) { - /* if the block is solid and a leaves block, fast graphics is enabled lol */ - /* we can remove the first check to apply to custom blocks */ - return block instanceof AbstractLeavesBlock && block.getRenderLayer() == BlockLayer.SOLID; - } - - public static String getVariantName(Block block, BlockState state) { - if (block instanceof LeavesBlock) { - return state.get(LeavesBlock.VARIANT).toString(); - } else if (block instanceof Leaves2Block) { - return state.get(Leaves2Block.VARIANT).toString(); - } - /* default value. hopefully this is never needed. as the above 2 classes are the only ones extending abstractleavesblock */ - /* that being said, this will cause a conflict with any mod which adds custom leaves extending the abstractleavesblock class lol */ - return "oak"; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/SoundUtil.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/SoundUtil.java deleted file mode 100644 index e1e9ef2d6..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/SoundUtil.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util; - -public class SoundUtil { - - public static int getDoorSound() { - return Math.random() < 0.5 ? 1006 : 1003; - } -} diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/ducks/ILivingEntity.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/ducks/ILivingEntity.java deleted file mode 100644 index fc040fffd..000000000 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/util/ducks/ILivingEntity.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * For more information, see the LICENSE file. - */ - -package io.github.axolotlclient.oldanimations.util.ducks; - -public interface ILivingEntity { - - /* sharing is caring */ - float axolotlclient$getPrevHealth(); -} diff --git a/versions/1.8.9/src/main/resources/assets/axolotlclient-oldanimations/lang/en_us.json b/versions/1.8.9/src/main/resources/assets/axolotlclient-oldanimations/lang/en_us.json index f52955bce..d0c7b0eb8 100644 --- a/versions/1.8.9/src/main/resources/assets/axolotlclient-oldanimations/lang/en_us.json +++ b/versions/1.8.9/src/main/resources/assets/axolotlclient-oldanimations/lang/en_us.json @@ -1,21 +1,10 @@ { - "axolotlclient-oldanimations": "Old Animations", + "axolotlclient-oldanimations": "1.7 Animations", "blockingItemUsing": "Blocking/Item Using", "sneaking": "Sneaking", "items": "Items", "spriteRendering": "Sprite Rendering", "itemPositions": "Item Positions", - "resources": "Resources", - "models": "Models", - "textures": "Textures", - "sounds": "Sounds", - "particles": "Particles", - "combat": "Combat", - "gui": "GUI", - "debugOverlay": "Debug Overlay", - "tabOverlay": "Tab Overlay", - "enchantmentGlint": "Enchantment Glint", - "hitbox": "Hitbox", "offsets": "Offsets / Eye Height", "useAndMine": "Use and Mine Animation", "useAndMine.tooltip": "Animates the item while the player holds down right mouse button then left mouse button while aiming at the ground.", @@ -25,32 +14,12 @@ "blockHitting.tooltip": "Animates the item while the player clicks both mouse buttons.", "firstPersonPositions": "First Person Item Positions", "firstPersonPositions.tooltip": "Reverts first person item transformations to match 1.7. Currently, this feature will disable the ability for resource packs to alter item positions, however, this is subject to change in the future.", - "secondLayerDamageTint": "Second Layer Damage Tint", - "secondLayerDamageTint.tooltip": "Applies the damage tint to the second layer of entities. This means that the player's armor, spider eyes, and endermen eyes will be tinted.", "smoothSneaking": "Smooth Sneaking", "smoothSneaking.tooltip": "Smoothly interpolates the player's changing eye height as they sneak.", - "heartFlashing": "Heart Flashing Logic", - "heartFlashing.tooltip": "Brings back the heart flashing logic from 1.7.", - "show1_7_10": "Replace 1.8.9 Text with 1.7.10", - "show1_7_10.tooltip": "Replaces the 1.8.9 version number with 1.7.10. This includes the debug menu, title screen, display title, snooper, and crash reports!", - "debugInfo": "Debug Info", - "debugInfo.tooltip": "Use debug information found in the 1.7 debug menu.", - "disableDebugBackground": "Disable Background", - "disableDebugBackground.tooltip": "Disables the background on text.", - "alwaysShowCrosshair": "Always Show Crosshair", - "alwaysShowCrosshair.tooltip": "Always shows the crosshair. Replaces the debug menu axis indicator with the regular crosshair as it doesn't exist in 1.7.", - "debugTextSpacing": "Text Spacing", - "debugTextSpacing.tooltip": "Spaces the text in a manner that is identical to 1.7.", - "debugTextColorScheme": "Color Scheme", - "debugTextColorScheme.tooltip": "Applies the mismatched color scheme of the 1.7 debug menu", - "debugTextShadow": "Enable Text Shadow", - "debugTextShadow.tooltip": "Enables text shadow.", "thirdPersonSneaking": "Third Person Sneaking Position", "thirdPersonSneaking.tooltip": "Positions the player model to mimic it's position while sneaking in 1.7. Only viewable in third person mode.", "allowMiningCancel": "Pause Mining by Using", "allowMiningCancel.tooltip": "Allows the player to pause their mining progress by using an item. This may cause some jarring issues with the mining progress. It's advised to use this feature alongside the \"Mining Progress Reset Logic\" feature to completely fix those issues.", - "damageTintColor": "Damage Tint Color", - "damageTintColor.tooltip": "Applies the old damage tint color. This color is possible by porting the 1.7 damage tint rendering!", "stickRod": "Replace Cast Fishing Rod Texture With Stick Texture", "stickRod.tooltip": "Replaces the cast fishing rod texture with the stick texture while in third person mode. Weirdly a feature in 1.7.", "blockingArm": "Third Person Sword Blocking Arm Position", @@ -61,30 +30,10 @@ "mirroredProjectiles.tooltip": "Mirrors projectiles so that they face the correct direction! This is a bug in 1.8.", "flameOffset": "Player Flame Offset", "flameOffset.tooltip": "Offsets the flame (when set on fire) of the player. Only viewable on your player! This is a bug in 1.7.", - "disableTitles": "Disable In-Game Titles", - "disableTitles.tooltip": "Disables in-game titles as they don't exist in 1.7.", "oldItemPickup": "Item Pickup Offset", "oldItemPickup.tooltip": "Offsets the item pickup animation to match 1.7.", - "oldGlint": "Glint Rotation/Scale", - "oldGlint.tooltip": "Rotates and scales the enchantment glint's texture coordinates to match 1.7's glint rendering.", - "oldGuiGlint": "Glint in GUI", - "oldGuiGlint.tooltip": "Renders the enchantment glint in the GUI in a manner that matches 1.7.", - "oldGlintColor": "Glint Color Schemes", - "oldGlintColor.tooltip": "Uses the 1.7 enchantment glint color scheme.", - "centeredSelectionMenus": "Centered Selection Menus", - "centeredSelectionMenus.tooltip": "Centers selection menus such that they start from the middle of the screen. Affects the multiplayer, singleplayer, and modmenu screens!", - "tabDimensions": "Player List Dimensions", - "tabDimensions.tooltip": "Replicates the dimensions and behaviors of the player list menu. The boxes, width, and length mimic 1.7.", - "disableTabPlayerHeads": "Disable Player Heads", - "disableTabPlayerHeads.tooltip": "Stops rendering player heads.", - "disableTabHeader": "Disable Header", - "disableTabHeader.tooltip": "Disables the header section.", - "disableTabFooter": "Disable Footer", - "disableTabFooter.tooltip": "Disables the footer section.", "equipLogic": "Item Equip Animation Logic", "equipLogic.tooltip": "Replicates the equip animation played by switching items within the player's inventory or hotbar.", - "oldDamageTick": "Damage Animation Logic", - "oldDamageTick.tooltip": "For some reason in 1.7, the damage animation (hurt tilt, damage tint, etc) are ahead slightly. This option replicates that behavior!", "oldSwingVisual": "Swing During Miss Penalty", "oldSwingVisual.tooltip": "Visually swings the player's arm during the miss penalty. In 1.7, the miss penalty does not affect combat, so this option sort of emulates that behavior but without modifying 1.8 combat.", "oldSwingVisualParticles": "Show Particles on Missed Hits", @@ -93,160 +42,42 @@ "slowUpSneak.tooltip": "Makes the sneaking up animation slower to match 1.7", "stopLineTranslateSneak": "Stop Fishing Rod Line Translation while Sneaking", "stopLineTranslateSneak.tooltip": "Stops the fishing rod's line from translating down while sneaking. Only viewable while in the third person perspective.", - "oldGlintLayer": "Only Render Glint on Layer 0", - "oldGlintLayer.tooltip": "Only renders the enchantment glint on the first layer of an item. Such items include potions, monster spawn eggs, firework charges, and leather armor. This behavior only occurs for the item while it is held in 1.7.", - "skullModel": "Old Skull Model", - "skullModel.tooltip": "Uses the old entity skull model and texture for skull items (not blocks). Toggling this will reload the game resources!", "xpOrbPosition": "XP Orb Offset", "xpOrbPosition.tooltip": "Offsets the XP orb's position. This is a bug in 1.7!", - "disableServerSelectionButtons": "Disable Server List Selection Buttons", - "disableServerSelectionButtons.tooltip": "Disables the server list selection buttons in the multiplayer menu as they don't exist in 1.7!", - "disableUnknownServerIcon": "Remove Unknown Server Icon", - "disableUnknownServerIcon.tooltip": "Removes the unknown server icon in the multiplayer menu as it does not exist in 1.7.", - "disableSkinCustomizationButton": "Disable Skin Customization Button", - "disableSkinCustomizationButton.tooltip": "Removes the skin customization settings page within the in-game settings as skin layers don't exist in 1.7.", - "oldMultiplayerSettingsPage": "Old Multiplayer Settings Page", - "oldMultiplayerSettingsPage.tooltip": "Brings back the multiplayer settings page which replaces the chat settings page. Intended to be paired with the \"disableSkinCustomizationButton\" feature.", "fixThirdPersonHeldItemSneakDeSync": "Fix Held Item Sneaking De-sync", "fixThirdPersonHeldItemSneakDeSync.tooltip": "Fixes a de-sync which occurs when sneaking and holding an item. Only viewable from the third person perspective. This is a bug in 1.8.", "oldBowRotation": "Bow Rotation", "oldBowRotation.tooltip": "Rotates the bow in a manner that replicates its exact position in 1.7.", "swordBlockThirdPerson": "Third Person Sword Item Blocking Position", "swordBlockThirdPerson.tooltip": "Gives the sword item the 1.7 sword-block transformations in third person mode.", - "fastGrass": "Remove Grass Side Overlay", - "fastGrass.tooltip": "Disables the grass side overlay. This was removed in 1.8.", - "difficultyLogic": "Difficulty Logic", - "difficultyLogic.tooltip": "Brings back the ability to change the difficulty of worlds from the main menu. This \"global\" difficulty will take precedence over individual world difficulties that are set. This option also hides the difficulty lock button as it does not exist in 1.7!", - "moveSprintKeybind": "Old Controls Menu Layout", - "moveSprintKeybind.tooltip": "Moves the sprint keybind to the gameplay category within the controls menu which is the case in 1.7. This option requires a game restart to apply properly!", - "oldDamageTintLighting": "Apply Lighting to Damage Tint", - "oldDamageTintLighting.tooltip": "Allows the damage tint's red hue to be influenced by the surrounding lighting just like in 1.7.", - "refreshResourcesRegardless": "Refresh Resources Regardless Of Change", - "refreshResourcesRegardless.tooltip": "Refreshes game resources when the done button is pressed in the resource packs window regardless of whether or not the pack was changed. Behavior taken straight from 1.7.", - "removeHitboxEyeLine": "Remove Hitbox Eye Height Line", - "removeHitboxEyeLine.tooltip": "Removes the eye height debug line while hitboxes are enabled to match 1.7", - "hitboxOffset": "Player Hitbox Offset", - "hitboxOffset.tooltip": "Offsets the hitbox of the player. Only viewable on your player! This is a bug in 1.7.", - "disableGlintOnBlocks": "Disable Glint on Blocks", - "disableGlintOnBlocks.tooltip": "Disables the enchantment glint on blocks with enchantments applied to them. In 1.7, the enchantment glint can only render on items and not blocks!", - "separateDamageTintFromGlint": "Render Damage Tint Without Glint", - "separateDamageTintFromGlint.tooltip": "If an enchantment glint is present on armor pieces, this option renders the 1.8 damage tint without affecting the glint color which matches 1.7. This option is redundant if \"Damage Tint Color\" is enabled.", "doubleTapSneak": "Double Tap Sneak to Sprint", "doubleTapSneak.tooltip": "Allows you to double tap your sneak keybind to activate sprinting. This was a bug in 1.7.", "framedItemLighting": "Framed Item Lighting", "framedItemLighting.tooltip": "Allows framed items to have lighting applied to them just like in 1.7.", - "clientSideEntityMovement": "Clientside Entity Movement", - "clientSideEntityMovement.tooltip": "Entity movement is predicted clientside in 1.7. Only works in singleplayer!", - "voidFog": "Void Fog", - "voidFog.tooltip": "Brings back the void fog which was removed in 1.8!", - "dontSortTabEntries": "Don't Sort Player List Entries", - "dontSortTabEntries.tooltip": "In 1.7, the player list entries are not sorted in any particular order.", - "hideScoreboardHearts": "Hide Scoreboard Hearts", - "hideScoreboardHearts.tooltip": "Some servers may render hearts in the player list to visualize the health of players. Such a feature does not exist in 1.7!", - "oldObjectivesPosition": "Old Objectives Position", - "oldObjectivesPosition.tooltip": "Positions player list objectives to be in the same position as they are in 1.7. They are aligned with the entity's name rather than with the end of the entry slot.", "miningProgressResetLogic": "Mining Progress Reset Logic", "miningProgressResetLogic.tooltip": "Resets the mining progress when the player stops holding down their left mouse button just like in 1.7.", - "rowBasedEntryOrder": "Row Based Entry Order", - "rowBasedEntryOrder.tooltip": "In 1.7, the player list entries are arranged across rows rather than down columns.", - "dontUpdateEffectsHud": "Don't Update Status Effects HUD Offset", - "dontUpdateEffectsHud.tooltip": "In 1.7, the inventory position does not get updated if existing potion effects clear while the player has their inventory open.", - "inventoryTextLighting": "Inventory Menu Text Lighting", - "inventoryTextLighting.tooltip": "Allows the inventory menu screen text to have lighting effects applied to it if the player is holding an item. This is a bug in 1.7.", "oldJumpBoostPotionColor": "Jump Boost Potion Color", "oldJumpBoostPotionColor.tooltip": "Before 1.8, the jump boost effect had a darkish purple color. Toggling this will reload the game resources!", - "controlsListButtonHeight": "Controls List Keybind Entry Button Height", - "controlsListButtonHeight.tooltip": "Reverts the height of the keybind entry buttons from 20 pixels to 18 pixels.", - "fire": "Fire Rendering", - "fire.tooltip": "Reverts fire rendering to use both fire textures. Toggling this will reload the game resources!", - "eggEntityCollisionParticles": "Egg Entity Collision Particles", - "eggEntityCollisionParticles.tooltip": "In 1.7, the egg entity displays snowball particles upon collision. This is a bug in 1.7.", - "fallParticles": "Entity Ground Collision Particles Effect", - "fallParticles.tooltip": "In 1.7, the particles that appear when an entity collides with the ground render based on the block position and not the entity's position. Likewise, the effect that is displayed appears different in 1.7 compared to 1.8.", - "noSkullLayerDamageTint": "Don't Render Damage Tint on Worn Skull", - "noSkullLayerDamageTint.tooltip": "Stops a worn skull or player head from rendering the damage tint like in 1.7. This option is redundant if \"Damage Tint Color\" is enabled.", - "fireChargeSound": "Fire Charge Use Sound", - "fireChargeSound.tooltip": "Reverts the sound played when using a fire charge to that of a flint and steel being ignited.", - "skullBlockRendering": "Remove Skull Block Hat Layer", - "skullBlockRendering.tooltip": "Renders placed skull blocks without the hat layer.", "creeperOffset": "Creeper Model Offset", "creeperOffset.tooltip": "Offsets the model of the creeper by 2 pixels. This was a bug in 1.7. This feature requires you to reload the game!", - "hopperSound": "Hopper Place/Break Sound", - "hopperSound.tooltip": "Changes the sound of breaking or placing hoppers to be that of wooden planks. This option requires a game restart to apply properly!", - "fireSound": "Fire Block Sound", - "fireSound.tooltip": "Changes the sound of jumping in fire blocks to be that of wooden planks. This option requires a game restart to apply properly!", - "disconnectScreen": "Disconnect Screen", - "disconnectScreen.tooltip": "Renders the disconnect screen like it would be in 1.7. This screen is shown when prematurely disconnecting from a server.", - "disconnectServerToTitleScreen": "Disconnecting Button Logic", - "disconnectServerToTitleScreen.tooltip": "When pressed while in a multiplayer server, the user will be sent to the title screen just like they would in a singleplayer world or in 1.7.", - "customizeWorldPresetIcons": "Customize World Preset Icons", - "customizeWorldPresetIcons.tooltip": "Changes the preset icons for \"Water World\" and \"Overworld\" to match 1.7. This option requires a game restart to apply properly!", - "packFormatWarning": "Remove Pack Format Warning", - "packFormatWarning.tooltip": "Removes the warning that is displayed when you have an incompatible texture pack in your folder.", "goldenCarrotCreativeTab": "Show Golden Carrot in Food Tab", "goldenCarrotCreativeTab.tooltip": "Places the golden carrot in the food tab in the creative mode menu. This option requires a game restart to apply properly!", - "fastSmoothLighting": "Fast Smooth Lighting", - "fastSmoothLighting.tooltip": "Uses a simplified smooth lighting logic. Smooth lighting must be set to minimum for the feature to take effect. This may increase performance just like it did in 1.7!", - "litFurnaceMinecart": "Always Show Furnace Minecart as Lit", - "litFurnaceMinecart.tooltip": "As the title suggests, the furnace minecart will always render as lit just like in 1.7.", - "tallBlockBreakSync": "Tall Block Break Sync", - "tallBlockBreakSync.tooltip": "Fixes a bug introduced in 1.8 where doors and double plants don't update their model accordingly when destroyed.", - "buggedChatOpacity": "Bugged Chat Opacity", - "buggedChatOpacity.tooltip": "Between 1.6 and 1.7, the chat opacity feature was bugged and would only change the opacity of the chat background and not the chat messages.", - "modelShadeAndAmbientOcclusion": "Model Shading and Ambient Occlusion", - "modelShadeAndAmbientOcclusion.tooltip": "Enables/Disables shading and ambient occlusion on certain block models to match 1.7. Such models include hoppers, cauldrons, flower pots and potted plants, redstone repeaters and comparators, brewing stands, melon and pumpkin stems, levers, fence gates, and tripwire hooks. Toggling this will reload the game resources!", - "fenceGateItemModel": "Simplified Fence Gate Item Model", - "fenceGateItemModel.tooltip": "Uses a simplified fence gate item model when held by an entity like in 1.7. Toggling this will reload the game resources!", - "fenceGateWallMode": "Fence Gate Wall Connection", - "fenceGateWallMode.tooltip": "Fixes a bug introduced in 1.8 where the fence gate will prematurely enter \"wall\" mode. Toggling this will reload the game resources!", - "itemModelSideQuadRendering": "Item Model Side Rendering", - "itemModelSideQuadRendering.tooltip": "Renders the side elements of an item using 1.7's rendering logic. This feature renders extra geometry which is demanding and so performance isn't the best with this option enabled. Toggling this will reload the game resources!", - "oldFastLeaves": "Old Fast Leaves", - "oldFastLeaves.tooltip": "Renders leaves block items as solid when graphics is set to fast. If \"Old Opaque Leaves Textures\" is enabled, this option will not do anything.", - "opaqueLeavesTextures": "Opaque Leaves Textures", - "opaqueLeavesTextures.tooltip": "Uses the old opaque leaves textures from 1.7 when graphics is set to fast. Toggling this will reload the game resources!", - "guiBlockItemsMipmap": "GUI Block Items Mipmap", - "guiBlockItemsMipmap.tooltip": "Allows block items rendered in GUIs to have mipmapping applied to them similar to 1.7. The level of mipmapping is controlled through the in-game option. Toggling this will reload the game resources!", - "tntZFighting": "Primed TNT Z-Fighting", - "tntZFighting.tooltip": "Brings back the Primed TNT z-fighting bug from 1.7.", "shadowOffset": "Shadow Offset", "shadowOffset.tooltip": "Offsets the player's shadow to be approximately half of the player's height above the player's eye height like in 1.7.", - "showShadowInInventory": "Show Shadow In Inventory", - "showShadowInInventory.tooltip": "Renders the player's shadow in the inventory like in 1.7.", - "removeHitboxEyeVector": "Remove Hitbox Look Vector Line", - "removeHitboxEyeVector.tooltip": "Removes the look vector line from hitboxes to match 1.7", - "randomizeDoorSound": "Randomize Door Sound", - "randomizeDoorSound.tooltip": "Randomizes the door opening and closing sounds to match 1.7", - "witherArmorTexture": "Wither Armor Texture", - "witherArmorTexture.tooltip": "Uses the wither texture when rendering the wither armor. This was a bug in 1.7.", "horseRiderEyeHeight": "Rider Eye Height", "horseRiderEyeHeight.tooltip": "Reverts the player's eye height while riding a mob or a boat to what it was in 1.7.", "sleepEyeHeight": "Sleep Eye Height", "sleepEyeHeight.tooltip": "Reverts the player's eye height while sleeping to what it was in 1.7.", - "mipmapPrecision": "Mipmap Precision", - "mipmapPrecision.tooltip": "Reverts the mipmap precision back to what it was in 1.7. This allows non-power-of-two-sized textures to visibly be broken. Toggling this will reload the game resources!", - "dispenserClickSound": "Dispenser Click Sounds", - "dispenserClickSound.tooltip": "Changes the dispenser click sounds' position to match 1.7.", "potionEntityOffset": "Potion Entity Offset", "potionEntityOffset.tooltip": "Offsets the potion entity's rendering vertically to match 1.7.", "playerEyeHeightOffset": "Player Eye Height Offset", "playerEyeHeightOffset.tooltip": "This feature literally only affects the eating particles and the third person fishing rod line position for other player entities. These two are positioned just slightly higher to match 1.7. The feature's name is an homage to the fact that the player's eye height is 0.12 in 1.7 under certain circumstances, and this value is used in like 2 or 3 places, but is ultimately overridden to 1.62 everywhere else.", - "dontShowFallParticlesOnFences": "Don't Show Fall Particles on Fences/Walls/Gates", - "dontShowFallParticlesOnFences.tooltip": "Fall particles are disabled on fences, walls, and gates just like 1.7.", "zombieVillagerHelmetOffset": "Zombie Villager Helmet Offset", "zombieVillagerHelmetOffset.tooltip": "Offsets worn helmets on zombie villagers by 2 pixels like in 1.7. This feature requires you to reload the game!", - "mobSizeDimensions": "Mob Size/Dimensions", - "mobSizeDimensions.tooltip": "Visually reverts the sizes/dimensions of various mobs to match 1.7. This can only affect the mob's fire, nametag, hitbox, or riding rendering.", "swapDroppedItemNormals": "Swap Dropped Item Normals", "swapDroppedItemNormals.tooltip": "Swaps the normal values when rendering dropped items like in 1.7. The normals dictate how light bounces off the different flat and extruded edges of that sprite. Intended to be paired with the \"droppedItemSprite\" feature.", "droppedItemsFacePlayer": "Dropped Items Face Players", "droppedItemsFacePlayer.tooltip": "Dropped items will face the player rather than spin like in 1.7. Intended to be paired with the \"droppedItemSprite\" feature.", - "dontAsyncReloadResources": "Don't Async Reload Resources", - "dontAsyncReloadResources.tooltip": "1.7 doesn't async reload resources, rather, it reloads resources when a screen is null. This only really affects changing slider options which have an impact on resources such as mipmaps or anisotropic filtering.", - "inventoryPressurePlateDimensions": "Inventory Pressure Plate Dimensions", - "inventoryPressurePlateDimensions.tooltip": "Reverts the pressure plate's width to be that of a normal block like in 1.7. This only applies to the model in the inventory and while held or dropped.", - "mipmapAllBlocks": "Apply Mipmapping to All Blocks ", - "mipmapAllBlocks.tooltip": "Applies mipmaps to all rendered world/terrain blocks like in 1.7. NOTE: OptiFine messes with this feature.", "projectileSprite": "Projectile Sprite Rendering", "projectileSprite.tooltip": "Renders projectiles as sprites rather than as models like in 1.7.", "swapProjectileSpriteNormals": "Swap Projectile Item Normals", @@ -261,14 +92,8 @@ "thirdPersonPositions.tooltip": "Reverts third person item transformations to match 1.7. Currently, this feature will disable the ability for resource packs to alter item positions, however, this is subject to change in the future.", "trapDoorItemPosition": "Trapdoor Item Position", "trapDoorItemPosition.tooltip": "Reverts the trapdoor item model position when viewed in the inventory, while held, or dropped to match 1.7. Toggling this will reload the game resources!", - "disableItemEntitySplashSound": "Disable Item Entity Splash Sound", - "disableItemEntitySplashSound.tooltip": "Removes the splash sound produced by dropping an item entity into water to match 1.7.", "useAndMineSound": "Use and Mine Sound", "useAndMineSound.tooltip": "Plays block mining sounds while using and item and mining to imiate block breaking.", - "disableItemEntitySplashParticles": "Disable Item Entity Splash Particles", - "disableItemEntitySplashParticles.tooltip": "Removes the splash particles produced by dropping an item entity into water to match 1.7.", - "fastGrassItem": "Remove Grass Side Overlay on Inventory Item", - "fastGrassItem.tooltip": "Renders the grass block item without the overlay even if fancy graphics is enabled like in 1.7.", "framedItemRotationOffset": "Framed Item Rotation Offset", "framedItemRotationOffset.tooltip": "Offsets items slightly in an item frame on the 90, 180, and 270 degree marks to match 1.7." } diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/acacia_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/acacia_leaves_opaque.json deleted file mode 100644 index fd2a424bd..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/acacia_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "acacia_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/birch_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/birch_leaves_opaque.json deleted file mode 100644 index ad56a377a..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/birch_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "birch_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/dark_oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/dark_oak_leaves_opaque.json deleted file mode 100644 index 54a077e89..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/dark_oak_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "dark_oak_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/jungle_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/jungle_leaves_opaque.json deleted file mode 100644 index 58297367d..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/jungle_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "jungle_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/oak_leaves_opaque.json deleted file mode 100644 index ed9bee488..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/oak_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "oak_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/spruce_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/spruce_leaves_opaque.json deleted file mode 100644 index 66c83d46d..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/blockstates/spruce_leaves_opaque.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "spruce_leaves_opaque" } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_fence_gate_inventory.json deleted file mode 100644 index 174c0f3d7..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_acacia" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_leaves_opaque.json deleted file mode 100644 index 6e638ad67..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/acacia_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_acacia_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_fence_gate_inventory.json deleted file mode 100644 index 86523dfa7..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_birch" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_leaves_opaque.json deleted file mode 100644 index 134afb7e7..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/birch_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_birch_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_fence_gate_inventory.json deleted file mode 100644 index 9066c8bfc..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_big_oak" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_leaves_opaque.json deleted file mode 100644 index 949bbb701..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/dark_oak_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_big_oak_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fast_grass.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fast_grass.json deleted file mode 100644 index 0f3c636ac..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fast_grass.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "textures": { - "particle": "blocks/dirt", - "bottom": "blocks/dirt", - "top": "blocks/grass_top", - "side": "blocks/grass_side" - }, - "elements": [ - { - "from": [ 0, 0, 0 ], - "to": [ 16, 16, 16 ], - "faces": { - "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#bottom", "cullface": "down" }, - "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#top", "cullface": "up", "tintindex": 0 }, - "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#side", "cullface": "north" }, - "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#side", "cullface": "south" }, - "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#side", "cullface": "west" }, - "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#side", "cullface": "east" } - } - } - ] -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fence_gate_inventory.json deleted file mode 100644 index b2fe7bebb..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/fence_gate_inventory.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "textures": { - "particle": "#texture" - }, - "elements": [ - { "__comment": "Left-hand post", - "from": [ 0, 5, 7 ], - "to": [ 2, 16, 9 ], - "faces": { - "down": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" }, - "up": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" }, - "north": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" }, - "south": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" }, - "west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "west" }, - "east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" } - } - }, - { "__comment": "Right-hand post", - "from": [ 14, 5, 7 ], - "to": [ 16, 16, 9 ], - "faces": { - "down": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" }, - "up": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" }, - "north": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" }, - "south": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" }, - "west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" }, - "east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "east" } - } - }, - { "__comment": "Simplified gate door", - "from": [2, 8, 7], - "to": [14, 15, 9], - "faces": { - "down": { "uv": [2, 7, 14, 9], "texture": "#texture" }, - "up": { "uv": [2, 7, 14, 9], "texture": "#texture" }, - "north": { "uv": [2, 1, 14, 8], "texture": "#texture" }, - "south": { "uv": [2, 1, 14, 8], "texture": "#texture" }, - "west": { "uv": [7, 1, 9, 8], "texture": "#texture" }, - "east": { "uv": [7, 1, 9, 8], "texture": "#texture" } - } - } - ] -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_fence_gate_inventory.json deleted file mode 100644 index 5e7733035..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_jungle" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_leaves_opaque.json deleted file mode 100644 index cfd8583b6..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/jungle_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_jungle_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_fence_gate_inventory.json deleted file mode 100644 index dcf76db25..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_oak" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_leaves_opaque.json deleted file mode 100644 index f6ca3b0bb..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/oak_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_oak_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_fence_gate_inventory.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_fence_gate_inventory.json deleted file mode 100644 index b2c87e83a..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_fence_gate_inventory.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/fence_gate_inventory", - "textures": { - "texture": "blocks/planks_spruce" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_leaves_opaque.json deleted file mode 100644 index 1ff6dbebe..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/block/spruce_leaves_opaque.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/leaves", - "textures": { - "all": "blocks/leaves_spruce_opaque" - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/acacia_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/acacia_leaves_opaque.json deleted file mode 100644 index 382efe104..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/acacia_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/acacia_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/birch_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/birch_leaves_opaque.json deleted file mode 100644 index 7b94fb1ec..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/birch_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/birch_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/dark_oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/dark_oak_leaves_opaque.json deleted file mode 100644 index 233b8f790..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/dark_oak_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/dark_oak_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fast_grass.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fast_grass.json deleted file mode 100644 index e64d9f542..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fast_grass.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/fast_grass", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fire.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fire.json deleted file mode 100644 index 190d84db7..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/fire.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "blocks/fire_layer_0" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_lava.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_lava.json deleted file mode 100644 index ab0bf2761..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_lava.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "blocks/lava_flow" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_water.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_water.json deleted file mode 100644 index 6e5428779..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/flowing_water.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "blocks/water_flow" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/jungle_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/jungle_leaves_opaque.json deleted file mode 100644 index 1a4b2a305..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/jungle_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/jungle_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/lava.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/lava.json deleted file mode 100644 index d65df022e..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/lava.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "blocks/lava_still" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/oak_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/oak_leaves_opaque.json deleted file mode 100644 index 1131231ea..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/oak_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/oak_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_char.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_char.json deleted file mode 100644 index d8a23be0a..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_char.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parent": "item/skull_char", - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - }, - "gui": { - "rotation": [ 0, 0, 0 ], - "scale": [ 1.000000000597, 1.0000000597, 1.00000000597 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_creeper.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_creeper.json deleted file mode 100644 index 84a55825a..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_creeper.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parent": "item/skull_creeper", - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - }, - "gui": { - "rotation": [ 0, 0, 0 ], - "scale": [ 1.000000000597, 1.0000000597, 1.00000000597 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_skeleton.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_skeleton.json deleted file mode 100644 index 383389d31..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_skeleton.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parent": "item/skull_skeleton", - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - }, - "gui": { - "rotation": [ 0, 0, 0 ], - "scale": [ 1.000000000597, 1.0000000597, 1.00000000597 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_wither.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_wither.json deleted file mode 100644 index 8d28b9756..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_wither.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parent": "item/skull_wither", - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - }, - "gui": { - "rotation": [ 0, 0, 0 ], - "scale": [ 1.000000000597, 1.0000000597, 1.00000000597 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_zombie.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_zombie.json deleted file mode 100644 index 57577e467..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/old_skull_zombie.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parent": "item/skull_zombie", - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - }, - "gui": { - "rotation": [ 0, 0, 0 ], - "scale": [ 1.000000000597, 1.0000000597, 1.00000000597 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/spruce_leaves_opaque.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/spruce_leaves_opaque.json deleted file mode 100644 index bb93b5c94..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/spruce_leaves_opaque.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "block/spruce_leaves_opaque", - "display": { - "thirdperson": { - "rotation": [ 10, -45, 170 ], - "translation": [ 0, 1.5, -2.75 ], - "scale": [ 0.375, 0.375, 0.375 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/water.json b/versions/1.8.9/src/main/resources/assets/minecraft/models/item/water.json deleted file mode 100644 index 27adef596..000000000 --- a/versions/1.8.9/src/main/resources/assets/minecraft/models/item/water.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "blocks/water_still" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_acacia_opaque.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_acacia_opaque.png deleted file mode 100644 index e91ed32a4533ad62cdb8a765853ce43e43f1597f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmVf)MpQ88oDn=+FV#y8=nk%K29(g)O)wvi76I~>b&1?>GgVQ2LgeQWS7gO_U(3)`~5B+kH_X2 zCe~^-y}e$qoK7d1PN(V*heO$Jw~|aI<#M@5yWQ6K`F#HE;JZDJQ!bZnoBe)Y+-|o5 zS1J{ogSY}rCKDNt#};6*ScuQ(QyXJdt5y3(yVYuG5yN&0g@Qhy5|R>$g!%wNCD@@* zNbguIrguJ{7vuN)?Oa$+I2=|RJ6Nq&wsIzuu{J;>k%+|OaWP1IKA-xqTrTDDcqjz>% diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_big_oak_opaque.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_big_oak_opaque.png deleted file mode 100644 index e91ed32a4533ad62cdb8a765853ce43e43f1597f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmVf)MpQ88oDn=+FV#y8=nk%K29(g)O)wvi76I~>b&1?>GgVQ2LgeQWS7gO_U(3)`~5B+kH_X2 zCe~^-y}e$qoK7d1PN(V*heO$Jw~|aI<#M@5yWQ6K`F#HE;JZDJQ!bZnoBe)Y+-|o5 zS1J{ogSY}rCKDNt#};6*ScuQ(QyXJdt5y3(yVYuG5yN&0g@Qhy5|R>$g!%wNCD@@* zNbguIrguJ{7vuN)?Oa$+I2=|RJ6Nq&wsIzuu{J;>k%+|OaWP1IKA-xqTrTDDcqjz>% diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_birch_opaque.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_birch_opaque.png deleted file mode 100644 index e91ed32a4533ad62cdb8a765853ce43e43f1597f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmVf)MpQ88oDn=+FV#y8=nk%K29(g)O)wvi76I~>b&1?>GgVQ2LgeQWS7gO_U(3)`~5B+kH_X2 zCe~^-y}e$qoK7d1PN(V*heO$Jw~|aI<#M@5yWQ6K`F#HE;JZDJQ!bZnoBe)Y+-|o5 zS1J{ogSY}rCKDNt#};6*ScuQ(QyXJdt5y3(yVYuG5yN&0g@Qhy5|R>$g!%wNCD@@* zNbguIrguJ{7vuN)?Oa$+I2=|RJ6Nq&wsIzuu{J;>k%+|OaWP1IKA-xqTrTDDcqjz>% diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_jungle_opaque.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_jungle_opaque.png deleted file mode 100644 index 110a618e10b84ebe1270f9169512181fc6797cab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349 zcmV-j0iyniP)BF#0_pRIy&J)7CYyy6!dk6n zG?KNhu4_NfvoFiizO*dMd{Gn@UzWwr>$=)qp63<=)+vFK002WW{f`6+M0Hk%QHc`3 ze<5HHfMFQy+;v@u1@Lhblsdgs0{GK3`KD=}v47z0yf*`p5l~`GfPO(hg((79AV4Ba z3EQ^y<2b&xz#N#1hleVs@15`a-r^vDPXgu!1tdWA->f)MpQ88oDn=+FV#y8=nk%K29(g)O)wvi76I~>b&1?>GgVQ2LgeQWS7gO_U(3)`~5B+kH_X2 zCe~^-y}e$qoK7d1PN(V*heO$Jw~|aI<#M@5yWQ6K`F#HE;JZDJQ!bZnoBe)Y+-|o5 zS1J{ogSY}rCKDNt#};6*ScuQ(QyXJdt5y3(yVYuG5yN&0g@Qhy5|R>$g!%wNCD@@* zNbguIrguJ{7vuN)?Oa$+I2=|RJ6Nq&wsIzuu{J;>k%+|OaWP1IKA-xqTrTDDcqjz>% diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_spruce_opaque.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/blocks/leaves_spruce_opaque.png deleted file mode 100644 index 2e5228e89a3ae8e334e17429f246e20474729b04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 237 zcmVNQ*JHr1`k!AX0ldleuA{l=YkW9+O=f{1P(G#MVF#2=s3nuLLhJf!Y0V n;pGPX&x%>36qE4GBszZp`oa;?!5~i+00000NkvXXu0mjf#S~-6 diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_creeper.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_creeper.png deleted file mode 100644 index c195fd51b950ccc0ac7c8bc4f61cfb944207e853..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 344 zcmV-e0jK_nP)C&bDt#?ZP*PhAy?>oWkKaVWe zf4l~0PFDLLe>C#H<94(Ec_&l<`%LusUvMY(f9jr4uwftrfEc#{?nll3%ZG^nw}>$O zKlysk|L_@M|K=d>+Y1CaSY{e0+u_f3{ywz!qZ|B7?zgbnDt)bu}f zd-(q;*Zcm<_>26P^%47j_|k#@9zCxA<1Y9RHeku6S^op4`+=PdvKfTsLnZ#FUl0Ai z|I%*41{`{{`+xevG`MCMj^7jTKX8UGVFN%mHQg%!`+4%EmjCN6tN?q%y3hQ7#`$o< q20#@M!uS&tNC6={u=xnN2mk;+{j|oJ^hPWI00005Ht^8M{5K&{6Xk3Y zxHWDE9}_%2oO7t_8g1Lc7=xlHP?n`UtEviVn&MQz!a(2mn5GHddzn*6!JBizvMgBF z75lzp+csewM-fH^ES%?A0_;8vgUA@ZBw$!6CGei%FsC#s=(l{(k8N_)*5-93k>mUt(7B<3XXyp=PwfrV*K|z`u+vH073)ZY1>z8f&c&j07*qo IM6N<$f=IS#xc~qF diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_steve.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_steve.png deleted file mode 100644 index e56f4069d4f052997727811bdee748df0fe5f671..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmV-D0mA-?P)n9m^Z(b7;r_28!SP>BiVG~JCCmF?S4QwZUIRc1 zVc1wj@V}Fm(0_X^(f>Mfd|(4X1^_XB1GaVM{NLMG^#9njhW~rJi-7Es|7*&k{+p-@ z5jJ2|ZQB1WExG?e^xB5p|8t6B{_pNA`adVr2aE|C0MZNsLAIU$w^pZvHG|k705X)I z0dtbw{%@{M`oF!Y=zo@j0T}P=$oao0%l&^tunA!UCd4`apBC@%zud_b1^36<{cjAm zBy2#wtIq#iXDzT|5U%nw{@)yG4aOigK?9%)2x0t*38a7!9@u<@Tm%3B5FxR5@CzN` P00000NkvXXu0mjfsVS0B diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_wither.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_wither.png deleted file mode 100644 index 357160327afaf26bf67c6a8df90c07220ecd053e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`cRgJkLn>|^o#M;YY#`7YTgepu z$V)(^wJRuR>lHWFl}dUsrH@xuHO~7|sx~2rOG;p2qkG+nn*2}McjEn>GlOr+?2u0Q zF4U%IbKY6RwLpe_TI#`Vxt7m%>G@nfqO~9|T4u9P7qg_wtEg}JzRHYCQW>mOJ)0Cb zQe=;RTt0W%O1TTY%0We^J!A?5nM6~s@-bIUlDklvHHoEWr;~sWcf}cFttf5wqE}o& zBCKqu{J1~V#^=o`3Qdxj-z8R{=Pi?Q*soGA`|7@+u)iiR8TX&#j@s{I0}SkqYR#|elF{r5}E+_gJ{A4 diff --git a/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_zombie.png b/versions/1.8.9/src/main/resources/assets/minecraft/textures/items/skull_zombie.png deleted file mode 100644 index 67d1347c222d0ba3c6edc26877add5af3c987740..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmV-F0l@x=P)x8u&k}H|#%%&TJ3+A64z~zhFw#|G;V+FeYdKNVAlb6c}gs27oog_#i_G8sJxL z_CKxH?|<=xsQ(s0YG9l_HT1u4z4?EuR87JLcov%e_b4^`Z=b6B-!InyjLo7{|GN|# zg2f0LU>v6O-!N1GtO Date: Sat, 29 Aug 2026 04:49:44 +0000 Subject: [PATCH 2/2] Give 1.7 Animations a master toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mod tile now carries an enabled switch, and isEnabled() reads it, so switching the mod off leaves 1.8.9 untouched: every feature already goes through that check. Two places did not, and now do — the witch held-item translation cancel is tied to Third Person Item Positions like the rest of that layer's transforms, and the water/lava/fire block items that 14w25a removed are no longer re-registered, since the models backing them went away with the rest of the 1.7 model features. The resource-reload bookkeeping tracks the effective value of Trapdoor Item Position and Jump Boost Potion Color, so flipping the master switch rebakes the trapdoor model and the potion colour cache too. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01S3hUZRU7sMz9P9Uzub4xrU --- .../axolotlclient/config/ui/MenuCatalog.java | 4 +-- .../config/OldAnimationsConfig.java | 36 +++++++++++++------ .../oldanimations/mixin/ItemMixin.java | 31 ---------------- .../mob_layers/WitchHeldItemLayerMixin.java | 3 +- 4 files changed, 29 insertions(+), 45 deletions(-) diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java index 7dde4defa..7237646e5 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/config/ui/MenuCatalog.java @@ -149,8 +149,8 @@ public static List build() { continue; } if (OldAnimations.MODID.equals(name)) { - /* the 1.7 features are one mod tile with its groups as inline sections */ - modules.add(moduleFrom(name, Tab.MODS, null, nodesFrom(category, false))); + /* the 1.7 features are one toggleable mod tile with its groups as inline sections */ + modules.add(moduleFrom(name, Tab.MODS, firstEnabled(category.getOptions()), nodesFrom(category, false))); continue; } Tab tab = isSettings(name) ? Tab.SETTINGS : Tab.MODS; diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java index 0843868ad..e5bb82f31 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java @@ -45,6 +45,9 @@ public class OldAnimationsConfig { private final OptionCategory categoryItemPositions = OptionCategory.create("itemPositions"); private final OptionCategory categoryOffsets = OptionCategory.create("offsets"); + /* the master switch for every 1.7 feature */ + public final BooleanOption enabled = new BooleanOption("enabled", true); + public final BooleanOption useAndMine = new BooleanOption("useAndMine", true); public final BooleanOption useAndMineParticles = new BooleanOption("useAndMineParticles", true); public final BooleanOption useAndMineSound = new BooleanOption("useAndMineSound", true); @@ -97,18 +100,27 @@ public class OldAnimationsConfig { public final BooleanOption framedItemRotationOffset = new BooleanOption("framedItemRotationOffset", true); /* toggling these two rebuilds cached game state, so their previous values are tracked */ - private boolean previousTrapDoorItemPosition = trapDoorItemPosition.get(); - private boolean previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); + private boolean previousTrapDoorItemPosition = trapDoorItemPosition(); + private boolean previousOldJumpBoostPotionColor = oldJumpBoostPotionColor(); /** - * The 1.7 features no longer have a master switch: every one of them is - * individually configurable, which makes a global toggle redundant. + * Whether the 1.7 features apply at all. With the mod switched off every + * feature behaves as if its own toggle were off, so 1.8.9 is left alone. */ public static boolean isEnabled() { - return true; + return instance.enabled.get(); + } + + private boolean trapDoorItemPosition() { + return enabled.get() && trapDoorItemPosition.get(); + } + + private boolean oldJumpBoostPotionColor() { + return enabled.get() && oldJumpBoostPotionColor.get(); } public void initConfig() { + category.add(enabled); category.add(blockingItemUsing); blockingItemUsing.add( blockHitting, @@ -179,8 +191,8 @@ public void initConfig() { configManager.load(); /* attempt to prevent calling resourcereload during game init */ - previousTrapDoorItemPosition = trapDoorItemPosition.get(); - previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); + previousTrapDoorItemPosition = trapDoorItemPosition(); + previousOldJumpBoostPotionColor = oldJumpBoostPotionColor(); /* reload the resources upon toggling certain options */ reloadResources(); @@ -189,17 +201,19 @@ public void initConfig() { /** * The trapdoor item model is baked at resource load, and potion colors are * cached separately, so both need a nudge when their option is toggled. + * The master switch counts as toggling both of them. */ private void reloadResources() { MinecraftClientEvents.TICK_END.register(client -> { - if (trapDoorItemPosition.get() != previousTrapDoorItemPosition) { - previousTrapDoorItemPosition = trapDoorItemPosition.get(); + if (trapDoorItemPosition() != previousTrapDoorItemPosition) { + previousTrapDoorItemPosition = trapDoorItemPosition(); + previousOldJumpBoostPotionColor = oldJumpBoostPotionColor(); Minecraft.getInstance().reloadResources(); reloadPotionColors = true; return; } - if (oldJumpBoostPotionColor.get() != previousOldJumpBoostPotionColor) { - previousOldJumpBoostPotionColor = oldJumpBoostPotionColor.get(); + if (oldJumpBoostPotionColor() != previousOldJumpBoostPotionColor) { + previousOldJumpBoostPotionColor = oldJumpBoostPotionColor(); reloadPotionColors = true; } }); diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemMixin.java index 8b7dca683..3d410a13a 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/ItemMixin.java @@ -21,46 +21,15 @@ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; import net.minecraft.item.CreativeModeTab; import net.minecraft.item.Item; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Slice; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Item.class) public abstract class ItemMixin { - @Shadow - private static void register(Block block) { - } - - @Inject(method = "init", at = @At("HEAD")) - private static void axolotlclient$addRemovedBlocks(CallbackInfo ci) { - /* adds in the blocks that 14w25a removed */ - /* this will allow us to actually give ourselves the item with commands in game like 1.7 ;) */ - register(Blocks.WATER); - register(Blocks.LAVA); - register(Blocks.FLOWING_WATER); - register(Blocks.FLOWING_LAVA); - register(Blocks.FIRE); - //TODO: models -// register(Blocks.NETHER_PORTAL); -// register(Blocks.END_PORTAL); - - /* //TODO: one day... - register(Blocks.DOUBLE_STONE_SLAB); - register(Blocks.DOUBLE_WOODEN_SLAB); - register(Blocks.COCOA); - register(Blocks.POTATOES); - register(Blocks.CARROTS); - */ - } - @WrapOperation( method = "init", slice = @Slice( diff --git a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WitchHeldItemLayerMixin.java b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WitchHeldItemLayerMixin.java index d7c57cf84..44cb26122 100644 --- a/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WitchHeldItemLayerMixin.java +++ b/versions/1.8.9/src/main/java/io/github/axolotlclient/oldanimations/mixin/mob_layers/WitchHeldItemLayerMixin.java @@ -91,7 +91,8 @@ public class WitchHeldItemLayerMixin { @WrapWithCondition(method = "render(Lnet/minecraft/entity/living/mob/monster/WitchEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;translatef(FFF)V", ordinal = 5)) private boolean axolotlclient$wrapWitchLayerTranslate(float f, float g, float h) { - return false; + /* the translation is replaced by the transforms above, so it only goes away with them */ + return !(OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.thirdPersonPositions.get()); } @ModifyArg(method = "render(Lnet/minecraft/entity/living/mob/monster/WitchEntity;FFFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/platform/GlStateManager;rotatef(FFFF)V", ordinal = 7), index = 1)