Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: runic etchings now work on gloves #2254

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ dependencies {
compileOnly fg.deobf("me.shedaniel:RoughlyEnoughItems-default-plugin-forge:$rei_version")
compileOnly fg.deobf("me.shedaniel.cloth:cloth-config-forge:$cloth_config_version")
compileOnly fg.deobf("dev.architectury:architectury-forge:$architectury_version")

compileOnly fg.deobf("org.violetmoon.quark:Quark:${project.quark_version}")
compileOnly fg.deobf("org.violetmoon.zeta:Zeta:${project.zeta_version}")
}

repositories {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mappings=2023.08.20-1.20.1
mixinextras_version=0.2.0-beta.9
nitrogen_version=1.20.1-1.0.7-neoforge
cumulus_version=1.20.1-1.0.0-neoforge
curios_version=5.3.5
curios_version=5.6.1
caelus_version=3.1.0+1.20
jei_version=15.2.0.27
crafttweaker_version=1.20.1:14.0.14
Expand All @@ -30,6 +30,8 @@ lootr_version=4608503
rei_version=12.0.684
cloth_config_version=11.1.118
architectury_version=9.1.12
quark_version=4.0-460.3466
zeta_version=1.0-22.109

# Publishing
curseforge_id=255308
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.armortrim.ArmorTrim;
import net.minecraftforge.fml.ModList;
import org.violetmoon.quark.content.tools.module.ColorRunesModule;
import top.theillusivec4.curios.api.SlotContext;
import top.theillusivec4.curios.api.client.ICurioRenderer;

Expand Down Expand Up @@ -91,7 +93,12 @@ public <T extends LivingEntity, M extends EntityModel<T>> void render(ItemStack
finalTrimModel.renderToBuffer(poseStack, trimConsumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
});
if (stack.hasFoil()) {
model.renderToBuffer(poseStack, buffer.getBuffer(RenderType.armorEntityGlint()), packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
RenderType glint = RenderType.armorEntityGlint();
if (ModList.get().isLoaded("quark")) {
ColorRunesModule.setTargetStack(stack);
glint = ColorRunesModule.Client.getArmorEntityGlint();
}
model.renderToBuffer(poseStack, buffer.getBuffer(glint), packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
}
}

Expand Down Expand Up @@ -142,7 +149,12 @@ public void renderFirstPerson(ItemStack stack, PoseStack poseStack, MultiBufferS
gloveTrimArm.render(poseStack, trimConsumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
});
if (stack.hasFoil()) {
gloveArm.render(poseStack, buffer.getBuffer(RenderType.armorEntityGlint()), packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
RenderType glint = RenderType.armorEntityGlint();
if (ModList.get().isLoaded("quark")) {
ColorRunesModule.setTargetStack(stack);
glint = ColorRunesModule.Client.getArmorEntityGlint();
}
gloveArm.render(poseStack, buffer.getBuffer(glint), packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
}
}
}