WIP: re-add gender mod
This commit is contained in:
@@ -221,7 +221,7 @@ val citResewnSourceSet = createIsolatedSourceSet("citresewn", isEnabled = false)
|
|||||||
val yaclSourceSet = createIsolatedSourceSet("yacl", isEnabled = false)
|
val yaclSourceSet = createIsolatedSourceSet("yacl", isEnabled = false)
|
||||||
val explosiveEnhancementSourceSet =
|
val explosiveEnhancementSourceSet =
|
||||||
createIsolatedSourceSet("explosiveEnhancement", isEnabled = false) // TODO: wait for their port
|
createIsolatedSourceSet("explosiveEnhancement", isEnabled = false) // TODO: wait for their port
|
||||||
val wildfireGenderSourceSet = createIsolatedSourceSet("wildfireGender", isEnabled = false) // TODO: wait on their port
|
val wildfireGenderSourceSet = createIsolatedSourceSet("wildfireGender")
|
||||||
val modmenuSourceSet = createIsolatedSourceSet("modmenu", isEnabled = false)
|
val modmenuSourceSet = createIsolatedSourceSet("modmenu", isEnabled = false)
|
||||||
val reiSourceSet = createIsolatedSourceSet("rei")
|
val reiSourceSet = createIsolatedSourceSet("rei")
|
||||||
val moulconfigSourceSet = createIsolatedSourceSet("moulconfig", isEnabled = false)
|
val moulconfigSourceSet = createIsolatedSourceSet("moulconfig", isEnabled = false)
|
||||||
@@ -268,6 +268,7 @@ dependencies {
|
|||||||
include(libs.jarvis.fabric)
|
include(libs.jarvis.fabric)
|
||||||
|
|
||||||
(wildfireGenderSourceSet.modImplementationConfigurationName)(libs.femalegender)
|
(wildfireGenderSourceSet.modImplementationConfigurationName)(libs.femalegender)
|
||||||
|
(wildfireGenderSourceSet.implementationConfigurationName)(customTexturesSourceSet.output)
|
||||||
(configuredSourceSet.modImplementationConfigurationName)(libs.configured)
|
(configuredSourceSet.modImplementationConfigurationName)(libs.configured)
|
||||||
(sodiumSourceSet.modImplementationConfigurationName)(libs.sodium)
|
(sodiumSourceSet.modImplementationConfigurationName)(libs.sodium)
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ freecammod = "1.3.1+mc1.21.3"
|
|||||||
ncr = "Fabric-1.21.3-v2.10.0"
|
ncr = "Fabric-1.21.3-v2.10.0"
|
||||||
|
|
||||||
# Update from https://modrinth.com/mod/female-gender/versions?l=fabric
|
# Update from https://modrinth.com/mod/female-gender/versions?l=fabric
|
||||||
femalegender = "4.3+1.21.4"
|
femalegender = "4.3.2+1.21.4"
|
||||||
|
|
||||||
# Update from https://modrinth.com/mod/explosive-enhancement/versions?l=fabric
|
# Update from https://modrinth.com/mod/explosive-enhancement/versions?l=fabric
|
||||||
explosiveenhancement = "1.2.3-1.21.0"
|
explosiveenhancement = "1.2.3-1.21.0"
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
|
idea
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("net.fabricmc:stitch:0.6.2")
|
implementation("net.fabricmc:stitch:0.6.2")
|
||||||
}
|
}
|
||||||
|
val compilerModules = listOf("util", "comp", "tree", "api", "code")
|
||||||
|
.map { "jdk.compiler/com.sun.tools.javac.$it" }
|
||||||
|
|
||||||
tasks.withType(JavaCompile::class) {
|
tasks.withType(JavaCompile::class) {
|
||||||
val module = "ALL-UNNAMED"
|
val module = "ALL-UNNAMED"
|
||||||
options.compilerArgs.addAll(listOf(
|
options.compilerArgs.addAll(
|
||||||
"--add-exports=jdk.compiler/com.sun.tools.javac.util=$module",
|
compilerModules.map { "--add-exports=$it=$module" }
|
||||||
"--add-exports=jdk.compiler/com.sun.tools.javac.comp=$module",
|
)
|
||||||
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=$module",
|
|
||||||
"--add-exports=jdk.compiler/com.sun.tools.javac.api=$module",
|
|
||||||
"--add-exports=jdk.compiler/com.sun.tools.javac.code=$module",
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package moe.nea.firmament.mixins.compat.wildfiregender;
|
package moe.nea.firmament.mixins.compat.wildfiregender;
|
||||||
|
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
|
||||||
import com.llamalad7.mixinextras.sugar.Local;
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import com.wildfire.render.GenderArmorLayer;
|
import com.wildfire.render.GenderArmorLayer;
|
||||||
import moe.nea.firmament.features.texturepack.CustomGlobalArmorOverrides;
|
import moe.nea.firmament.features.texturepack.CustomGlobalArmorOverrides;
|
||||||
import net.minecraft.item.ArmorItem;
|
import net.minecraft.component.type.EquippableComponent;
|
||||||
import net.minecraft.item.ArmorMaterial;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.registry.entry.RegistryEntry;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Pseudo;
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -16,22 +14,10 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
@Mixin(GenderArmorLayer.class)
|
@Mixin(GenderArmorLayer.class)
|
||||||
@Pseudo
|
@Pseudo
|
||||||
public class PatchArmorTexturesInGenderMod {
|
public class PatchArmorTexturesInGenderMod {
|
||||||
@WrapOperation(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V",
|
@ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/state/BipedEntityRenderState;FF)V",
|
||||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ArmorItem;getMaterial()Lnet/minecraft/registry/entry/RegistryEntry;"))
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;"))
|
||||||
private RegistryEntry<ArmorMaterial> replaceArmorMaterial(ArmorItem instance, Operation<RegistryEntry<ArmorMaterial>> original, @Local ItemStack chestplate) {
|
private Object replaceArmorMaterial(Object original, @Local ItemStack chestplate) {
|
||||||
var entry = original.call(instance);
|
var overrides = CustomGlobalArmorOverrides.overrideArmor(chestplate, EquipmentSlot.CHEST);
|
||||||
var overrides = CustomGlobalArmorOverrides.overrideArmor(chestplate);
|
return overrides.orElse((EquippableComponent) original);
|
||||||
if (overrides == null)
|
|
||||||
return entry;
|
|
||||||
var material = entry.value();
|
|
||||||
return RegistryEntry.of(new ArmorMaterial(
|
|
||||||
material.defense(),
|
|
||||||
material.enchantability(),
|
|
||||||
material.equipSound(),
|
|
||||||
material.repairIngredient(),
|
|
||||||
overrides,
|
|
||||||
material.toughness(),
|
|
||||||
material.knockbackResistance()
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user