Skip to content

Commit

Permalink
Remove RenderingContext
Browse files Browse the repository at this point in the history
  • Loading branch information
Noaaan committed Dec 22, 2024
1 parent 30040ae commit 4f2056e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
8 changes: 8 additions & 0 deletions PATCHNOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ Most of these are made by thyreo. Thanks a ton for the new textures!
- Midas Gold Ingot reworked
- Palladium Ingot reworked

## Other Changes

- Updated wiki-exporting commands
- Removed explicit Elytra-handling with the Hallowed Cape renderer
- This fixes a bug related to cape stopping rendering when close to Elytras
- This *might* cause some minor visual bugs if wearing an Elytra using something like Elytra Slot
- Needs further testing

# 0.20.2

- Added armor to vanilla tags, which improves mod compat (#263)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import nourl.mythicmetals.armor.MythicArmor;
import nourl.mythicmetals.client.models.MythicModelHandler;
import nourl.mythicmetals.client.models.StarPlatCloakModel;
import nourl.mythicmetals.client.rendering.RenderingContext;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
import net.minecraft.util.Identifier;
import nourl.mythicmetals.armor.CelestiumElytra;
import nourl.mythicmetals.armor.MythicArmor;
import nourl.mythicmetals.client.rendering.RenderingContext;
import nourl.mythicmetals.misc.RegistryHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Environment(EnvType.CLIENT)
@Mixin(ElytraFeatureRenderer.class)
Expand All @@ -39,18 +37,4 @@ public abstract class ElytraFeatureRendererMixin {
}
return RegistryHelper.id("textures/models/celestium_elytra.png");
}

@Inject(
method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V",
at = @At(value = "HEAD"))
public void mythicmetals$clearElytraRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntity livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) {
RenderingContext.elytraRendered = false;
}

@Inject(
method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;pop()V"))
public void mythicmetals$isElytraRendered(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntity livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) {
RenderingContext.elytraRendered = true;
}
}

0 comments on commit 4f2056e

Please sign in to comment.