review fix

This commit is contained in:
ebolaV2 committed 2026-02-09 20:00:18 +01:00
1 parent 774c31fd07
commit 274a08e979
2 files changed
+7 -2

No files matched your search

@@ -1,11 +1,13 @@
package com.brandon3055.draconicevolution.client.model;
import com.brandon3055.draconicevolution.integration.ModHelper;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import net.minecraft.entity.player.EntityPlayer;
import xonin.backhand.api.core.BackhandUtils;
public class ModelDraconicArmor extends ModelBiped {
@@ -177,7 +179,8 @@ public class ModelDraconicArmor extends ModelBiped {
} else {
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
if (entity instanceof EntityPlayer) {
if (cpw.mods.fml.common.Loader.isModLoaded("backhand")) {
// REVIEW FIX: Use the cached boolean from ModHelper
if (ModHelper.isBackhandLoaded) {
BackhandHelper.applyFix(this, (EntityPlayer) entity);
}
}
@@ -217,7 +220,7 @@ public class ModelDraconicArmor extends ModelBiped {
private static class BackhandHelper {
public static void applyFix(ModelDraconicArmor model, EntityPlayer player) {
if (xonin.backhand.api.core.BackhandUtils.getOffhandItem(player) != null) {
if (BackhandUtils.getOffhandItem(player) != null) {
model.bipedLeftArm.rotateAngleX = model.bipedLeftArm.rotateAngleX * 0.5F - ((float)Math.PI / 10F);
model.bipedLeftArm.rotateAngleY = 0.0F;
}
@@ -27,6 +27,7 @@ public class ModHelper {
public static boolean isGTNHLibLoaded;
public static boolean isHodgepodgeLoaded;
public static boolean isBackhandLoaded;
private static Item cleaver;
private static Item avaritiaSword;
@@ -40,6 +41,7 @@ public class ModHelper {
isAE2Installed = Loader.isModLoaded("appliedenergistics2");
isGTNHLibLoaded = Loader.isModLoaded("gtnhlib");
isHodgepodgeLoaded = Loader.isModLoaded("hodgepodge");
isBackhandLoaded = Loader.isModLoaded("backhand");
final String AE2_FITEM_CLASS = "appeng.entity.EntityFloatingItem";