Skip to content

Commit

Permalink
Remove some old armor code
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Oct 10, 2024
1 parent 7995e74 commit 7adbca7
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ public static Path getGameDir() {


public static boolean shouldApplyMixin(String source, String mixinClassName) {
return shouldApplyMixin(source, mixinClassName, false);
}
public static boolean shouldApplyMixin(String source, String mixinClassName, boolean armor) {
var disabledReason = getDisabledMixin(source, mixinClassName);
if (disabledReason != null) {
CommonImpl.LOGGER.warn("Mixin '" + mixinClassName + "' from '" + source + "' was disabled by "
Expand Down Expand Up @@ -224,7 +221,6 @@ public static boolean shouldApplyMixin(String source, String mixinClassName, boo
case "emi" -> CompatStatus.EMI;
case "lithium" -> CompatStatus.LITHIUM;
case "jei" -> CompatStatus.JEI;
case "armor" -> CompatStatus.REQUIRE_ALT_ARMOR_HANDLER || armor;
case "ip" -> CompatStatus.IMMERSIVE_PORTALS;
case "quiltReg" -> CompatStatus.QUILT_REGISTRY;
default -> true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public final class CompatStatus {
public static final boolean CANVAS = LOADER.isModLoaded("canvas");
public static final boolean OPTIBAD = LOADER.isModLoaded("optifabric");

public static final boolean REQUIRE_ALT_ARMOR_HANDLER = IRIS || CANVAS || OPTIBAD;

public static final boolean IMMERSIVE_PORTALS = LOADER.isModLoaded("imm_ptl_core");

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class PolymerResourcePackImpl {
public static final boolean FORCE_REQUIRE;
public static final boolean USE_OFFSET;
public static final int OFFSET_VALUES;
public static final boolean USE_ALT_ARMOR_HANDLER;
public static final List<String> INCLUDE_MOD_IDS;
public static final List<String> INCLUDE_ZIPS;
public static final UUID MAIN_UUID;
Expand All @@ -37,8 +36,6 @@ public class PolymerResourcePackImpl {

OFFSET_VALUES = config.offsetValue;

USE_ALT_ARMOR_HANDLER = config.useAlternativeArmorHandler || CompatStatus.REQUIRE_ALT_ARMOR_HANDLER;

INCLUDE_MOD_IDS = config.includeModAssets;

INCLUDE_ZIPS = config.includeZips;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import eu.pb4.polymer.resourcepack.api.AssetPaths;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.ResourcePackBuilder;
import eu.pb4.polymer.resourcepack.impl.ArmorTextureMetadata;
import eu.pb4.polymer.resourcepack.impl.metadata.PackMcMeta;
import eu.pb4.polymer.resourcepack.mixin.accessors.ResourceFilterAccessor;
import net.fabricmc.loader.api.FabricLoader;
Expand Down Expand Up @@ -604,8 +603,4 @@ private Identifier vId(String path) {
public enum OverridePlace {
BEFORE_EXISTING, EXISTING, BEFORE_CUSTOM_MODEL_DATA, CUSTOM_MODEL_DATA, END
}

private record ArmorData(Identifier identifier, int color, BufferedImage[] images,
ArmorTextureMetadata[] metadata) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public String getRefMapperConfig() {
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
var name = mixinClassName.substring(PACKAGE_ROOT.length());

return CommonImpl.shouldApplyMixin("polymer-resource-pack", name, PolymerResourcePackImpl.USE_ALT_ARMOR_HANDLER);
return CommonImpl.shouldApplyMixin("polymer-resource-pack", name);
}

@Override
Expand Down

0 comments on commit 7adbca7

Please sign in to comment.