Skip to content

Commit

Permalink
Fix elytra being rendered if origins is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Dec 11, 2023
1 parent be898c2 commit cc37c9d
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -24,6 +24,7 @@
import org.figuramc.figura.lua.api.vanilla_model.VanillaPart;
import org.figuramc.figura.model.ParentType;
import org.figuramc.figura.permissions.Permissions;
import org.figuramc.figura.utils.PlatformUtils;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand Down Expand Up @@ -83,7 +84,7 @@ public void cancelVanillaPart(PoseStack poseStack, MultiBufferSource multiBuffer


ItemStack itemStack = livingEntity.getItemBySlot(EquipmentSlot.CHEST);
if (!itemStack.is(Items.ELYTRA)) {
if (!itemStack.is(Items.ELYTRA) && !PlatformUtils.isModLoaded("origins")) {
return;
}
if (figura$avatar != null && figura$avatar.luaRuntime != null && figura$avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT) == 1 && figura$avatar.luaRuntime.vanilla_model.ELYTRA.checkVisible()) {
Expand All @@ -101,6 +102,7 @@ public void cancelVanillaPart(PoseStack poseStack, MultiBufferSource multiBuffer
stack.popPose();
});
} else if (figura$avatar != null && figura$avatar.luaRuntime != null && figura$avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT) == 1 && !figura$avatar.luaRuntime.vanilla_model.ELYTRA.checkVisible()){
renderedPivot = true;
poseStack.popPose();
ci.cancel();
return;
Expand Down

0 comments on commit cc37c9d

Please sign in to comment.