Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Commit 0bcc1da

Browse files
committed
yeah this one was long overdue... but there is still so much work to do :((((
1 parent 44924de commit 0bcc1da

25 files changed

Lines changed: 675 additions & 643 deletions

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
44

55
# Mod Properties
6-
version=1.0.0-beta.3
6+
version=1.0.0-beta.4
77

88
maven_group=io.github.axolotlclient.oldanimations
99
archives_base_name=AxolotlClient-OldAnimations
1010

1111
minecraft_18=1.8.9
1212

13-
mappings_18=1.8.9+build.27
13+
mappings_18=1.8.9+build.28
1414

15-
fabric_loader=0.17.0
15+
fabric_loader=0.17.2
1616

1717
osl=0.16.3
18-
config=3.0.16
19-
client=3.1.4
18+
config=3.0.17
19+
client=3.1.5
2020

21-
legacy_lwjgl3=1.2.6
21+
legacy_lwjgl3=1.2.8

src/main/java/io/github/axolotlclient/oldanimations/AxolotlClientModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
public class AxolotlClientModule extends AbstractModule {
2626
@Override
2727
public void init() {
28-
OldAnimations.runAfterFabricLoad(() -> AxolotlClient.CONFIG.rendering.add(OldAnimationsConfig.instance.getCategory(), false));
28+
OldAnimations.runAfterFabricLoad(() -> AxolotlClient.config().rendering.add(OldAnimationsConfig.instance.getCategory(), false));
2929
}
3030
}

src/main/java/io/github/axolotlclient/oldanimations/OldAnimations.java

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ public class OldAnimations implements ClientModInitializer {
3030
/* TODO LIST
3131
3232
--- Project ---
33-
add readme
34-
update deps (if needed)
33+
add readme and a proper to-do list
34+
set up modrinth page / submit for review
35+
add sane and safe defaults
3536
3637
--- Sneaking ---
3738
i really want to switch over to the 1.7 code instead of using the 1.13 code :/
@@ -40,25 +41,37 @@ update deps (if needed)
4041
--- Items ---
4142
blocks item positions (rotations) + fix trapdoors and pressure plates and other crap
4243
rod and bow and block positions and swing position.. can be separate options LOL
44+
split layer glint support for armor/spawn egg/firework charges
4345
4446
--- Textures/Models ---
4547
add better compatibility for old textures -> make them variants
4648
fix weird fuzzy texture sizes of swords and stuff
4749
fast grass always shown in gui/dropped?
48-
held pressure plates look a bit different?? idk why. THEYRE BIGGER THATS WHY
50+
held pressure plates look a bit different?? idk why. THEY'RE BIGGER THAT'S WHY
4951
old fence fate model
5052
oh my god. the custom models/textures are a damn nightmare of a mess
5153
tripwire texture and model changes
5254
cauldrons model and texture
5355
tops of certain blocks have switch uvs
54-
perhaps add an option to hide 1.8 blocks by using textures native to 1.7
56+
MC-262869 - top texture of blocks need to be rotated as noted above
57+
MC-262173 - tripwire hook using wrong wood texture
58+
MC-277768 - mipmap items
5559
5660
--- World ---
5761
old fast smooth lighting shadows
62+
figure out why hurtTime is off by 1 tick in 1.7... this might also impact other aspects of the game
63+
1.7 world gen speed
64+
MC-195505 - mipmap short grass
65+
1.7 fire is different than 1.8... wtf
66+
armor stands don't exist in 1.7... hmmm
67+
fog is possibly different with the perspective code being added in 1.8... but im not sure to what extent it matters
5868
5969
--- Misc ---
60-
improve fake block mining believability - paneblock and tripwireblock are still not accurate
61-
certain mob hitboxes should be visually changed
70+
certain mob hitboxes should be visually changed?? perhaps
71+
perhaps check if mining progress changed
72+
MC-73162 - breaking a painting breaks block behind it?
73+
MC-58120 - mob lag??? idk
74+
inventory text is lighter in 1.7 ??? interesting must look into :p
6275
6376
*/
6477

src/main/java/io/github/axolotlclient/oldanimations/config/OldAnimationsConfig.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ public class OldAnimationsConfig {
102102
public final BooleanOption oldRodRotation = new BooleanOption("oldRodRotation", true);
103103
public final BooleanOption oldBowRotation = new BooleanOption("oldBowRotation", true);
104104
public final BooleanOption swordBlockThirdPerson = new BooleanOption("swordBlockThirdPerson", true);
105-
public final BooleanOption useAndMineDestroyVisual = new BooleanOption("useAndMineDestroyVisual", false);
106105
public final BooleanOption fastGrass = new BooleanOption("fastGrass", false);
107106
public final BooleanOption oldDoorTextures = new BooleanOption("oldDoorTextures", false);
108107
public final BooleanOption oldDifficultyButtonLogic = new BooleanOption("oldDifficultyButtonLogic", false);
@@ -121,6 +120,15 @@ public class OldAnimationsConfig {
121120
public final BooleanOption framedItemLighting = new BooleanOption("framedItemLighting", true);
122121
public final BooleanOption oldMapArms = new BooleanOption("oldMapArms", true);
123122
public final BooleanOption oldGameModeCommand = new BooleanOption("oldGameModeCommand", false);
123+
public final BooleanOption alwaysShowOutline = new BooleanOption("alwaysShowOutline", true);
124+
public final BooleanOption blockEntityMiningProgress = new BooleanOption("blockEntityMiningProgress", false);
125+
public final BooleanOption clientSideEntityMovement = new BooleanOption("clientSideEntityMovement", true);
126+
public final BooleanOption oldFramerateChunkRendering = new BooleanOption("oldFramerateChunkRendering", false);
127+
public final BooleanOption voidFog = new BooleanOption("voidFog", false);
128+
public final BooleanOption dontSortTabEntries = new BooleanOption("dontSortTabEntries", false);
129+
public final BooleanOption hideScoreboardHearts = new BooleanOption("hideScoreboardHearts", false);
130+
public final BooleanOption oldObjectivesPosition = new BooleanOption("oldObjectivesPosition", false);
131+
public final BooleanOption miningProgressResetLogic = new BooleanOption("miningProgressResetLogic", true);
124132

125133
private final Supplier<Boolean>[] suppliers = new Supplier[] {
126134
enabled::get,
@@ -152,8 +160,8 @@ public void initConfig() {
152160
blockHitting,
153161
useAndMine,
154162
allowMiningCancel,
163+
miningProgressResetLogic,
155164
useAndMineParticles,
156-
useAndMineDestroyVisual,
157165
blockingArm,
158166
swordBlockThirdPerson
159167
);
@@ -188,6 +196,7 @@ public void initConfig() {
188196
);
189197
category.add(categoryCombat);
190198
categoryCombat.add(
199+
clientSideEntityMovement,
191200
oldSwingVisual,
192201
oldSwingVisualParticles,
193202
secondLayerDamageTint,
@@ -222,11 +231,14 @@ public void initConfig() {
222231
categoryGUI.add(categoryTabOverlay);
223232
categoryTabOverlay.add(
224233
tabDimensions,
234+
//TODO: fix compat with axolotlclient
235+
disableTabPlayerHeads,
225236
disableTabHeader,
226-
disableTabFooter
237+
disableTabFooter,
238+
hideScoreboardHearts,
239+
dontSortTabEntries,
240+
oldObjectivesPosition
227241
);
228-
//TODO: fix compat with axolotlclient
229-
categoryTabOverlay.add(disableTabPlayerHeads);
230242
category.add(categoryEnchantmentGlint);
231243
categoryEnchantmentGlint.add(
232244
oldGlint,
@@ -248,7 +260,10 @@ public void initConfig() {
248260
oldFogGrayScale,
249261
removeHitBoxEyeLines,
250262
hitboxOffset,
251-
oldGameModeCommand
263+
oldGameModeCommand,
264+
alwaysShowOutline,
265+
blockEntityMiningProgress,
266+
oldFramerateChunkRendering
252267
);
253268

254269
/* reload the resources upon toggling certain options */

src/main/java/io/github/axolotlclient/oldanimations/mixin/BlockModelRendererMixin.java

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
* This program is free software; you can redistribute it and/or
3+
* modify it under the terms of the GNU Lesser General Public
4+
* License as published by the Free Software Foundation; either
5+
* version 3 of the License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10+
* Lesser General Public License for more details.
11+
*
12+
* You should have received a copy of the GNU Lesser General Public License
13+
* along with this program; if not, write to the Free Software Foundation,
14+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15+
*
16+
* For more information, see the LICENSE file.
17+
*/
18+
19+
package io.github.axolotlclient.oldanimations.mixin;
20+
21+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
22+
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
23+
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
24+
import io.github.axolotlclient.oldanimations.util.ducks.IClientPlayerInteractionManager;
25+
import net.minecraft.client.ClientPlayerInteractionManager;
26+
import net.minecraft.client.Minecraft;
27+
import net.minecraft.client.network.handler.ClientPlayNetworkHandler;
28+
import net.minecraft.network.packet.Packet;
29+
import net.minecraft.util.math.BlockPos;
30+
import org.objectweb.asm.Opcodes;
31+
import org.spongepowered.asm.mixin.Final;
32+
import org.spongepowered.asm.mixin.Mixin;
33+
import org.spongepowered.asm.mixin.Shadow;
34+
import org.spongepowered.asm.mixin.injection.At;
35+
36+
@Mixin(ClientPlayerInteractionManager.class)
37+
public abstract class ClientPlayerInteractionManagerMixin implements IClientPlayerInteractionManager {
38+
39+
@Shadow
40+
private boolean isMiningBlock;
41+
42+
@Shadow
43+
private float miningProgress;
44+
45+
@Shadow
46+
@Final
47+
private Minecraft minecraft;
48+
49+
@Shadow
50+
private BlockPos target;
51+
52+
@ModifyExpressionValue(method = "stopMiningBlock", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/ClientPlayerInteractionManager;isMiningBlock:Z"))
53+
private boolean axolotlclient$allowStateReset(boolean original) {
54+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.miningProgressResetLogic.get()) {
55+
/* in 1.8, mining progress ONLY resets when the mining state is true. */
56+
/* this may sound logical, however, it's entirely possible for there */
57+
/* to be mining progress while the mining state is false in 1.8. */
58+
59+
/* this modification is not entirely needed to replicate 1.7 behavior since the modification done in */
60+
/* axolotlclient$fixMiningStatePacketLogic tackles the issue head on */
61+
return true;
62+
}
63+
return original;
64+
}
65+
66+
@WrapWithCondition(method = "stopMiningBlock", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/handler/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V"))
67+
private boolean axolotlclient$sendIfMiningBlock(ClientPlayNetworkHandler instance, Packet<?> packet) {
68+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.miningProgressResetLogic.get()) {
69+
/* the mining abort packet should only be sent if the player is genuinely in the mining state like in 1.7 */
70+
return isMiningBlock;
71+
}
72+
return true;
73+
}
74+
75+
@ModifyExpressionValue(method = "updateBlockMining", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/ClientPlayerInteractionManager;isMiningBlock(Lnet/minecraft/util/math/BlockPos;)Z"))
76+
private boolean axolotlclient$fixMiningStatePacketLogic(boolean original) {
77+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.miningProgressResetLogic.get()) {
78+
/* this code is not taken from 1.7 exactly, rather, it's an attempt to recreate a similar mining progress resetting behavior */
79+
/* in 1.7, block mining progress resets when the player is not mining regardless of the circumstances */
80+
/* this code is better than porting 1.7's code as it works with 1.8's packet order */
81+
82+
/* Moulberry (the goat) came up with the fix and gives a simple explanation in MC-255057 */
83+
84+
/* to really flesh out his explanation, the game basically determines whether the mining progress should be stopped/started */
85+
/* based on whether the block that the player is mining is in the place that it was mined at after mining is complete. */
86+
/* the game will also check whether the tool that is mining is the same tool that the player is holding. */
87+
/* it does not consider the current mining progress or mining state of the block, just it's position and whether the mining tool's integrity. */
88+
/* if the server spawns the block back instantly, therefore making the block occupy the same position as the one previously mined, */
89+
/* then the client will think that previous mining operation is continuing just due to the fact that the block is still there in the same place */
90+
/* which will result in a start mining packet not being sent at the appropriate moment. */
91+
/* this results in a sort of de-sync where the mining progress continues to exist even after mining technically ended */
92+
/* this can be easily amended by checking if mining state is currently in progress or complete. */
93+
/* if mining is not in progress (false), then the if statement will fail and the else statement would be enacted. */
94+
/* startMiningBlock will be invoked which will send a start mining packet appropriately, and the universe will be at peace at last. */
95+
96+
/* interestingly enough, startMiningBlock actually has this exact logic but inverted when determining which packet to send when attempting to mine */
97+
return original && isMiningBlock;
98+
}
99+
return original;
100+
}
101+
102+
@Override
103+
public void axolotlclient$fakeStopMiningBlock() {
104+
/* no mining abort packet shall be sent... grim don't hurt me :C */
105+
isMiningBlock = false;
106+
miningProgress = 0.0F;
107+
minecraft.world.updateBlockMiningProgress(minecraft.player.getNetworkId(), target, -1);
108+
}
109+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* This program is free software; you can redistribute it and/or
3+
* modify it under the terms of the GNU Lesser General Public
4+
* License as published by the Free Software Foundation; either
5+
* version 3 of the License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10+
* Lesser General Public License for more details.
11+
*
12+
* You should have received a copy of the GNU Lesser General Public License
13+
* along with this program; if not, write to the Free Software Foundation,
14+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15+
*
16+
* For more information, see the LICENSE file.
17+
*/
18+
19+
package io.github.axolotlclient.oldanimations.mixin;
20+
21+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
22+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
23+
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
24+
import net.minecraft.block.Block;
25+
import net.minecraft.block.state.BlockState;
26+
import net.minecraft.client.world.ClientWorld;
27+
import net.minecraft.entity.particle.ParticleType;
28+
import net.minecraft.util.math.BlockPos;
29+
import net.minecraft.util.profiler.Profiler;
30+
import net.minecraft.world.World;
31+
import net.minecraft.world.WorldData;
32+
import net.minecraft.world.dimension.Dimension;
33+
import net.minecraft.world.gen.WorldGeneratorType;
34+
import net.minecraft.world.storage.WorldStorage;
35+
import org.spongepowered.asm.mixin.Mixin;
36+
import org.spongepowered.asm.mixin.injection.At;
37+
38+
import java.util.Random;
39+
40+
@Mixin(ClientWorld.class)
41+
public abstract class ClientWorldMixin extends World {
42+
43+
protected ClientWorldMixin(WorldStorage worldStorage, WorldData worldData, Dimension dimension, Profiler profiler, boolean bl) {
44+
super(worldStorage, worldData, dimension, profiler, bl);
45+
}
46+
47+
@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"))
48+
private void axolotlclient$showDepthSuspendParticle(Block instance, World world, BlockPos blockPos, BlockState blockState, Random random, Operation<Void> original) {
49+
/* renders the depth suspend particle */
50+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.voidFog.get()) {
51+
if (world.isAir(blockPos)) {
52+
if (random.nextInt(8) > blockPos.getY() &&
53+
/* 1.7's hasFog() method */
54+
((DimensionAccessor) dimension).getGeneratorType() != WorldGeneratorType.FLAT && !dimension.isDark()) {
55+
addParticle(ParticleType.SUSPENDED_DEPTH, blockPos.getX() + random.nextFloat(), blockPos.getY() + random.nextFloat(), blockPos.getZ() + random.nextFloat(), 0.0, 0.0, 0.0);
56+
}
57+
} else {
58+
original.call(instance, world, blockPos, blockState, random);
59+
}
60+
} else {
61+
original.call(instance, world, blockPos, blockState, random);
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)