Skip to content

Commit 3955d2e

Browse files
committed
i should probably push this stuff
1 parent 8d273dc commit 3955d2e

88 files changed

Lines changed: 2892 additions & 637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ repositories {
3434
}
3535

3636
loom {
37+
accessWidenerPath.set(file("src/main/resources/oldanimations.accesswidener"))
38+
3739
mods {
3840
"axolotlclient-oldanimations" {
3941
sourceSet("main")

gradle.properties

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

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

88
maven_group=io.github.axolotlclient.oldanimations
99
archives_base_name=AxolotlClient-OldAnimations
@@ -15,7 +15,7 @@ mappings_18=1.8.9+build.28
1515
fabric_loader=0.17.2
1616

1717
osl=0.16.3
18-
config=3.0.17
18+
config=3.0.20-beta.1
1919
client=3.1.5
2020

21-
legacy_lwjgl3=1.2.8
21+
legacy_lwjgl3=1.2.9

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,47 +31,47 @@ public class OldAnimations implements ClientModInitializer {
3131
3232
--- Project ---
3333
add readme and a proper to-do list
34-
set up modrinth page / submit for review
35-
add sane and safe defaults
34+
add more categories (particles, sounds, blocks, etc...)
3635
3736
--- Sneaking ---
3837
i really want to switch over to the 1.7 code instead of using the 1.13 code :/
3938
need to verify if other players have a different sneaking position
4039
4140
--- Items ---
4241
blocks item positions (rotations) + fix trapdoors and pressure plates and other crap
43-
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
42+
MC-57895 - stairs are wrong direction
4543
4644
--- Textures/Models ---
47-
add better compatibility for old textures -> make them variants
4845
fix weird fuzzy texture sizes of swords and stuff
4946
fast grass always shown in gui/dropped?
5047
held pressure plates look a bit different?? idk why. THEY'RE BIGGER THAT'S WHY
51-
old fence fate model
52-
oh my god. the custom models/textures are a damn nightmare of a mess
53-
tripwire texture and model changes
54-
cauldrons model and texture
55-
tops of certain blocks have switch uvs
5648
MC-262869 - top texture of blocks need to be rotated as noted above
5749
MC-262173 - tripwire hook using wrong wood texture
58-
MC-277768 - mipmap items
50+
MC-277768 && MC-57574 && MC-195505 - mipmap items/blocks
51+
improve old skull stuff?
52+
anisotrophic filtering on items in 1.7
5953
6054
--- World ---
61-
old fast smooth lighting shadows
6255
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
56+
1.7 world gen speed??
57+
block destroy progress whiteness
58+
figure out how to separate certain models (flowers from flower pot, etc)
59+
60+
--- Mobs ---
61+
squids make footstep noises MC-4934
62+
witch bugged potion bottle
63+
mobs instant item pick up
64+
65+
-- Version Number --
66+
serverlistentry 1.8.9
67+
minecraftserver 1.8.9
68+
integrated server 1.8.9
6869
6970
--- Misc ---
70-
certain mob hitboxes should be visually changed?? perhaps
71-
perhaps check if mining progress changed
7271
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
72+
framed items are not centered - MC-8662
73+
mobentity blockentity? WHAT THE HELL IS THIS SUPPOSED TO MEAN RAHHH
74+
MC-5270 - suffocation screen order (buggy lava)
7575
7676
*/
7777

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

Lines changed: 139 additions & 68 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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.client.Minecraft;
25+
import net.minecraft.client.render.block.BlockModelRenderer;
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.injection.At;
28+
29+
import java.util.BitSet;
30+
31+
@Mixin(BlockModelRenderer.AmbientOcclusionFace.class)
32+
public class AmbientOcclusionFaceMixin {
33+
34+
@WrapOperation(method = "compute", at = @At(value = "INVOKE", target = "Ljava/util/BitSet;get(I)Z", ordinal = 3))
35+
private boolean axolotlclient$oldMinAmbientOcclusion(BitSet instance, int bitIndex, Operation<Boolean> original) {
36+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.fastSmoothLighting.get() &&
37+
/* only show when fast smooth lighting is active */
38+
Minecraft.getInstance().options.ambientOcclusion == 1) {
39+
/* use simple vertex lightmap and brightness assignment */
40+
return false;
41+
}
42+
return original.call(instance, bitIndex);
43+
}
44+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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.entity.BeaconBlockEntity;
25+
import net.minecraft.client.render.block.entity.BeaconRenderer;
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.Unique;
28+
import org.spongepowered.asm.mixin.injection.At;
29+
30+
import java.util.List;
31+
32+
@Mixin(BeaconRenderer.class)
33+
public class BeaconRendererMixin {
34+
35+
@Unique
36+
private final float[] axolotlclient$oldBeaconColor = { 1.0F, 1.0F, 1.0F };
37+
38+
@WrapOperation(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;DDDFI)V", at = @At(value = "INVOKE", target = "Ljava/util/List;size()I"))
39+
private int axolotlclient$renderBeaconOnce(List<?> instance, Operation<Integer> original) {
40+
/* no need to iterate through the beam sections. just rendering one singular beacon beam like 1.7 */
41+
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.beaconRendering.get() ? 1 : original.call(instance);
42+
}
43+
44+
@WrapOperation(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;DDDFI)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BeaconBlockEntity$BeamSection;getHeight()I"))
45+
private int axolotlclient$oldBeaconHeight(BeaconBlockEntity.BeamSection instance, Operation<Integer> original) {
46+
/* old height limit for the beam */
47+
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.beaconRendering.get() ? 256 : original.call(instance);
48+
}
49+
50+
@WrapOperation(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;DDDFI)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BeaconBlockEntity$BeamSection;getColor()[F"))
51+
private float[] axolotlclient$oldBeaconColor(BeaconBlockEntity.BeamSection instance, Operation<float[]> original) {
52+
/* the one color to rule them all */
53+
return OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.beaconRendering.get() ? axolotlclient$oldBeaconColor : original.call(instance);
54+
}
55+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
22+
import net.minecraft.block.Block;
23+
import net.minecraft.block.FireBlock;
24+
import net.minecraft.block.HopperBlock;
25+
import org.spongepowered.asm.mixin.Final;
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.Shadow;
28+
import org.spongepowered.asm.mixin.injection.At;
29+
import org.spongepowered.asm.mixin.injection.Inject;
30+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
31+
32+
@Mixin(Block.class)
33+
public class BlockMixin {
34+
35+
@Shadow
36+
@Final
37+
public static Block.Sound WOOD_SOUND;
38+
39+
@Inject(method = "setSound", at = @At("RETURN"))
40+
private void axolotlclient$oldBlockSounds(Block.Sound sound, CallbackInfoReturnable<Block> cir) {
41+
if (OldAnimationsConfig.isEnabled()) {
42+
Block block = (Block) (Object) this;
43+
if (OldAnimationsConfig.instance.fireSound.get() && block instanceof FireBlock) {
44+
/* the sound of jumping around in fire uses the wood sound in 1.7 and prior :D */
45+
block.sound = WOOD_SOUND;
46+
}
47+
48+
if (OldAnimationsConfig.instance.hopperSound.get() && block instanceof HopperBlock) {
49+
/* why were these blocks using wood sounds LMFAOOO */
50+
block.sound = WOOD_SOUND;
51+
}
52+
}
53+
}
54+
}

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,34 @@
1818

1919
package io.github.axolotlclient.oldanimations.mixin;
2020

21+
import net.minecraft.client.render.model.block.BlockElement;
2122
import net.minecraft.client.render.model.block.BlockModel;
23+
import net.minecraft.client.render.model.block.ModelTransformations;
2224
import net.minecraft.resource.Identifier;
2325
import org.spongepowered.asm.mixin.Mixin;
2426
import org.spongepowered.asm.mixin.gen.Accessor;
27+
import org.spongepowered.asm.mixin.gen.Invoker;
2528

29+
import java.util.List;
2630
import java.util.Map;
2731

2832
@Mixin(BlockModel.class)
2933
public interface BlockModelAccessor {
3034

35+
/* saw this in the spongepowered discord server :p */
36+
@Invoker("<init>")
37+
static BlockModel createBlockModel(List<BlockElement> list, Map<String, String> map, boolean bl, boolean bl2, ModelTransformations modelTransformations) {
38+
throw new AssertionError();
39+
}
40+
41+
@Invoker("<init>")
42+
static BlockModel createBlockModel(Identifier identifier, List<BlockElement> list, Map<String, String> map, boolean bl, boolean bl2, ModelTransformations modelTransformations) {
43+
throw new AssertionError();
44+
}
45+
46+
@Accessor
47+
ModelTransformations getTransformations();
48+
3149
@Accessor
3250
Map<String, String> getTextures();
3351

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.mojang.blaze3d.vertex.BufferBuilder;
22+
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
23+
import net.minecraft.block.Block;
24+
import net.minecraft.block.DoorBlock;
25+
import net.minecraft.block.DoublePlantBlock;
26+
import net.minecraft.block.state.BlockState;
27+
import net.minecraft.client.render.block.BlockModelRenderer;
28+
import net.minecraft.client.resource.model.BakedModel;
29+
import net.minecraft.util.math.BlockPos;
30+
import net.minecraft.world.WorldView;
31+
import org.spongepowered.asm.mixin.Mixin;
32+
import org.spongepowered.asm.mixin.injection.At;
33+
import org.spongepowered.asm.mixin.injection.Inject;
34+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
35+
36+
@Mixin(BlockModelRenderer.class)
37+
public class BlockModelRendererMixin {
38+
39+
@Inject(method = "render(Lnet/minecraft/world/WorldView;Lnet/minecraft/client/resource/model/BakedModel;Lnet/minecraft/block/state/BlockState;Lnet/minecraft/util/math/BlockPos;Lcom/mojang/blaze3d/vertex/BufferBuilder;Z)Z", at = @At("HEAD"), cancellable = true)
40+
private void axolotlclient$fixDoubleBlockDestroyModelDelay(WorldView worldView, BakedModel bakedModel, BlockState blockState, BlockPos blockPos, BufferBuilder bufferBuilder, boolean bl, CallbackInfoReturnable<Boolean> cir) {
41+
if (OldAnimationsConfig.isEnabled() && OldAnimationsConfig.instance.tallBlockBreakSync.get()) {
42+
/* finally, i have fixed MC-53439 */
43+
Block block = blockState.getBlock();
44+
int metadata = block.getMetadataFromState(blockState);
45+
boolean isUpperHalf = (metadata & 8) != 0;
46+
boolean cancel = false;
47+
48+
if (block instanceof DoorBlock) {
49+
cancel = worldView.isAir(isUpperHalf ? blockPos.down() : blockPos.up());
50+
}
51+
52+
if (block instanceof DoublePlantBlock) {
53+
cancel = isUpperHalf && worldView.isAir(blockPos.down());
54+
}
55+
56+
if (cancel) {
57+
cir.setReturnValue(false);
58+
}
59+
}
60+
}
61+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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.v2.WrapWithCondition;
22+
import io.github.axolotlclient.oldanimations.config.OldAnimationsConfig;
23+
import net.minecraft.client.gui.chat.ChatGui;
24+
import org.spongepowered.asm.mixin.Mixin;
25+
import org.spongepowered.asm.mixin.injection.At;
26+
27+
@Mixin(ChatGui.class)
28+
public class ChatGuiMixin {
29+
30+
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;enableBlend()V"))
31+
private boolean axolotlclient$oldChatOpacityState() {
32+
/* MC-36812 */
33+
/* forge actually fixes this in 1.7 funnily enough */
34+
/* only the background will change opacity now lmao */
35+
return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.buggedChatOpacity.get();
36+
}
37+
38+
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;disableAlphaTest()V"))
39+
private boolean axolotlclient$oldChatOpacityState2() {
40+
return !OldAnimationsConfig.isEnabled() || !OldAnimationsConfig.instance.buggedChatOpacity.get();
41+
}
42+
}

0 commit comments

Comments
 (0)