generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 2d items color (WIP ⚠️ ) and old skull position (1.8) + Remove ol…
…d projectile position (also WIP)
- Loading branch information
Showing
8 changed files
with
156 additions
and
119 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
src/main/java/me/mixces/animatium/mixins/renderer/entity/MixinFlyingItemEntityRenderer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/me/mixces/animatium/mixins/renderer/item/MixinVertexConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package me.mixces.animatium.mixins.renderer.item; | ||
|
||
import me.mixces.animatium.config.AnimatiumConfig; | ||
import me.mixces.animatium.util.ItemUtils; | ||
import net.minecraft.client.render.VertexConsumer; | ||
import net.minecraft.item.ModelTransformationMode; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyArgs; | ||
import org.spongepowered.asm.mixin.injection.invoke.arg.Args; | ||
|
||
@Mixin(VertexConsumer.class) | ||
public interface MixinVertexConsumer { | ||
|
||
// TODO: this is only half of the battle | ||
@ModifyArgs(method = "quad(Lnet/minecraft/client/util/math/MatrixStack$Entry;Lnet/minecraft/client/render/model/BakedQuad;[FFFFF[IIZ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack$Entry;transformNormal(FFFLorg/joml/Vector3f;)Lorg/joml/Vector3f;")) | ||
default void animatium$item2DColors(Args args) { | ||
if (AnimatiumConfig.getInstance().getItem2DColors()) { | ||
ModelTransformationMode transformationMode = ItemUtils.getTransformMode(); | ||
if (transformationMode == ModelTransformationMode.GROUND || transformationMode == ModelTransformationMode.FIXED) { | ||
args.set(1, (float) args.get(2)); | ||
args.set(2, (float) args.get(1)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.