diff --git a/dependencies.gradle b/dependencies.gradle index 6940836e..625cf8b8 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -117,7 +117,7 @@ dependencies { compileOnly rfg.deobf("curse.maven:advanced-rocketry-236542:3015079") // Version 1.7.0-232 (Newer Versions need Newer Lib Vulpes) // Architecture Craft (from CurseForge) - compileOnly rfg.deobf("curse.maven:architecture-craft-277631:2750633") // Version 3.98 + compileOnly rfg.deobf("curse.maven:architecture-craft-277631:4344128") // Version 3.108 // Effortless Building (from CurseForge) compileOnly rfg.deobf("curse.maven:effortless-building-302113:2847346") // Version 2.16 @@ -134,6 +134,9 @@ dependencies { // Default World Generator Port (from CurseForge) compileOnly rfg.deobf("curse.maven:default-world-generator-port-241140:2499252") // Version 2.3 + // Top Addons (from CurseForge) + compileOnly rfg.deobf("curse.maven:top-addons-247111:2887479") // Version 1.13.0 + /* -------------------------------- Soft Deps, Multiple Runtime Declaration -------------------------------- */ if (project.enable_draconic.toBoolean() || project.enable_thermal.toBoolean()) { runtimeOnly "curse.maven:redstone-flux-270789:2920436" // Version 2.1.1.1 @@ -202,7 +205,7 @@ dependencies { } if (project.enable_architecture_craft.toBoolean()) { - runtimeOnly "curse.maven:architecture-craft-277631:2750633" // Version 3.98 + runtimeOnly "curse.maven:architecture-craft-277631:4344128" // Version 3.108 } if (project.enable_effortless_building.toBoolean()) { @@ -226,6 +229,10 @@ dependencies { runtimeOnly "curse.maven:default-world-generator-port-241140:2499252" // Version 2.3 } + if (project.enable_top_addons.toBoolean()) { + runtimeOnly "curse.maven:top-addons-247111:2887479" // Version 1.13.0 + } + if (project.enable_ender_storage.toBoolean()) { // Ender Storage, runtime only, integrated in remappers (from CurseForge) runtimeOnly "curse.maven:ender-storage-245174:2755787" // Version 2.4.6.137 diff --git a/gradle.properties b/gradle.properties index d856a746..2dfa55a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -156,7 +156,8 @@ curseForgeRelations = requiredDependency:codechicken-lib-1-8;\ optionalDependency:default-world-generator-port;\ optionalDependency:dme;\ optionalDependency:ftb-library-legacy-forge;\ - optionalDependency:ftb-utilities-forge; + optionalDependency:ftb-utilities-forge;\ + optionalDependency:top-addons; # This project's release type on CurseForge and/or Modrinth # Alternatively this can be set with the 'RELEASE_TYPE' environment variable. @@ -253,17 +254,17 @@ enable_xu2 = false # If this is set to false, the mixin will not apply. enable_rocketry = false -# Whether to enable Architecture Craft in runtime. Enables the mixin which adds more Architecture Craft Slopes. +# Whether to enable Architecture Craft in runtime. Enables the mixin which adds more Architecture Craft Slopes, improves the Sawbench UI, and fixes the Sawbench Particle Texture. # If this is set to false, the mixin will not apply. enable_architecture_craft = false # Whether to enable Effortless Building in runtime. Enables the mixin which improves clarity of Reach Upgrades. # If this is set to false, the mixin will not apply. -enable_effortless_building = true +enable_effortless_building = false # Whether to enable FTB Utilities in runtime. Enables mixins which provide fixes relating to Ghost Items, and Effortless + FTB Utils Compat. # If this is set to false, Effortless + FTB Utils Compat will not be applied, and the mixin will not apply. -enable_ftb_utils = true +enable_ftb_utils = false # Whether to enable BQu in runtime. Enables Labs Tier Helper. enable_bqu = false @@ -274,6 +275,9 @@ enable_controlling = false # Whether to enable Default World Generator Port in runtime. Fixes GUI Rescaling Issues, adds a Cancel Button. enable_default_world_gen_port = false +# Whether to enable TOP Addons in runtime. Fixes Error Messages with Architecture Craft 3.108 +enable_top_addons = false + # Whether to enable Ender Storage in runtime. Enables remappers to remap items in ender storage. # If this is set to false, the remappers will not apply there. enable_ender_storage = false diff --git a/src/main/java/com/nomiceu/nomilabs/LabsValues.java b/src/main/java/com/nomiceu/nomilabs/LabsValues.java index 831d9538..e925b07f 100644 --- a/src/main/java/com/nomiceu/nomilabs/LabsValues.java +++ b/src/main/java/com/nomiceu/nomilabs/LabsValues.java @@ -38,4 +38,5 @@ public class LabsValues { public static final String DEFAULT_WORLD_GEN_MODID = "defaultworldgenerator-port"; public static final String DME_MODID = "deepmoblearning"; public static final String FTB_UTILS_MODID = "ftbutilities"; + public static final String TOP_ADDONS_MODID = "topaddons"; } diff --git a/src/main/java/com/nomiceu/nomilabs/NomiLabs.java b/src/main/java/com/nomiceu/nomilabs/NomiLabs.java index e06e29bf..6e187932 100644 --- a/src/main/java/com/nomiceu/nomilabs/NomiLabs.java +++ b/src/main/java/com/nomiceu/nomilabs/NomiLabs.java @@ -27,7 +27,8 @@ "required-after:jei@[4.15.0,);" + "required-after:theoneprobe;" + "after:advancedrocketry;" + "after:libvulpes;" + "after:crafttweaker@[4.1.20,);" + "after:appliedenergistics2;" + "after:architecturecraft;" + "after:effortlessbuilding;" + "after:betterquesting;" + - "after:defaultworldgenerator-port;" + "after:deepmoblearning;" + "after:ftbutilities;") + "after:defaultworldgenerator-port;" + "after:deepmoblearning;" + "after:ftbutilities;" + + "after:topaddons;") @SuppressWarnings("unused") public class NomiLabs { diff --git a/src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java b/src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java index 820fa0ed..0bd7190b 100644 --- a/src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java +++ b/src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java @@ -206,7 +206,7 @@ public static class ModIntegration { public boolean enableAdvancedRocketryIntegration = true; @Config.Comment({ - "Whether to enable ArchitectureCraft Integration, which adds new slope variants, and improves the GUI of the Sawbench.", + "Whether to enable ArchitectureCraft Integration, which adds new slope variants, improves the GUI of the Sawbench, and fixes the Sawbench Particle Texture.", "[default: true]" }) @Config.LangKey("config.nomilabs.mod_integration.architecture_craft") @Config.RequiresMcRestart @@ -231,6 +231,13 @@ public static class ModIntegration { @Config.RequiresMcRestart public boolean enableFTBUtilsIntegration = true; + @Config.Comment({ + "Whether to enable TOP Addons Integration. Fixes Error Messages with ArchitectureCraft 3.108.", + "[default: true]" }) + @Config.LangKey("config.nomilabs.mod_integration.top_addons") + @Config.RequiresMcRestart + public boolean enableTopAddonsIntegration = true; + public static class EffortlessBuildingIntegration { @Config.Comment({ "Whether to enable Effortless Building Integration, which splits the parts of reach.", diff --git a/src/main/java/com/nomiceu/nomilabs/core/LabsLateMixin.java b/src/main/java/com/nomiceu/nomilabs/core/LabsLateMixin.java index 209cc63e..1b7b4a5a 100644 --- a/src/main/java/com/nomiceu/nomilabs/core/LabsLateMixin.java +++ b/src/main/java/com/nomiceu/nomilabs/core/LabsLateMixin.java @@ -40,7 +40,9 @@ public class LabsLateMixin implements ILateMixinLoader { LabsConfig.modIntegration.enableDefaultWorldGenIntegration), new AbstractMap.SimpleImmutableEntry<>(LabsValues.DME_MODID, true), new AbstractMap.SimpleImmutableEntry<>(LabsValues.FTB_UTILS_MODID, - LabsConfig.modIntegration.enableFTBUtilsIntegration)) + LabsConfig.modIntegration.enableFTBUtilsIntegration), + new AbstractMap.SimpleImmutableEntry<>(LabsValues.TOP_ADDONS_MODID, + LabsConfig.modIntegration.enableTopAddonsIntegration)) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); @Override diff --git a/src/main/java/com/nomiceu/nomilabs/integration/architecturecraft/LabsShapes.java b/src/main/java/com/nomiceu/nomilabs/integration/architecturecraft/LabsShapes.java index c8a5c5de..228dce51 100644 --- a/src/main/java/com/nomiceu/nomilabs/integration/architecturecraft/LabsShapes.java +++ b/src/main/java/com/nomiceu/nomilabs/integration/architecturecraft/LabsShapes.java @@ -2,31 +2,31 @@ import net.minecraftforge.common.util.EnumHelper; -import com.elytradev.architecture.common.shape.Shape; +import com.elytradev.architecture.common.shape.EnumShape; +import com.elytradev.architecture.common.shape.EnumShapeSymmetry; import com.elytradev.architecture.common.shape.ShapeKind; -import com.elytradev.architecture.common.shape.ShapeSymmetry; import com.nomiceu.nomilabs.mixin.architecturecraft.ShapeAccessor; public class LabsShapes { - public static final Shape SLOPE_TILE_A1 = addShape("SLOPE_TILE_A1", 94, "Slope A Start", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 1, 0xcf); - public static final Shape SLOPE_TILE_A2 = addShape("SLOPE_TILE_A2", 95, "Slope A End", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 3, 0x0f); - public static final Shape SLOPE_TILE_B1 = addShape("SLOPE_TILE_B1", 96, "Slope B Start", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 1, 0xff); - public static final Shape SLOPE_TILE_B2 = addShape("SLOPE_TILE_B2", 97, "Slope B Middle", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 2, 0xcf); - public static final Shape SLOPE_TILE_B3 = addShape("SLOPE_TILE_B3", 98, "Slope B End", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 3, 0x0f); - public static final Shape SLOPE_TILE_C1 = addShape("SLOPE_TILE_C1", 99, "Slope C 1", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 1, 0xff); - public static final Shape SLOPE_TILE_C2 = addShape("SLOPE_TILE_C2", 100, "Slope C 2", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 2, 0xcf); - public static final Shape SLOPE_TILE_C3 = addShape("SLOPE_TILE_C3", 101, "Slope C 3", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 3, 0x0f); - public static final Shape SLOPE_TILE_C4 = addShape("SLOPE_TILE_C4", 102, "Slope C 4", ShapeKind.Roof, - ShapeSymmetry.BILATERAL, 1, 4, 0x0f); + public static final EnumShape SLOPE_TILE_A1 = addShape("SLOPE_TILE_A1", 94, "Slope A Start", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 1, 0xcf); + public static final EnumShape SLOPE_TILE_A2 = addShape("SLOPE_TILE_A2", 95, "Slope A End", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 3, 0x0f); + public static final EnumShape SLOPE_TILE_B1 = addShape("SLOPE_TILE_B1", 96, "Slope B Start", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 1, 0xff); + public static final EnumShape SLOPE_TILE_B2 = addShape("SLOPE_TILE_B2", 97, "Slope B Middle", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 2, 0xcf); + public static final EnumShape SLOPE_TILE_B3 = addShape("SLOPE_TILE_B3", 98, "Slope B End", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 3, 0x0f); + public static final EnumShape SLOPE_TILE_C1 = addShape("SLOPE_TILE_C1", 99, "Slope C 1", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 1, 0xff); + public static final EnumShape SLOPE_TILE_C2 = addShape("SLOPE_TILE_C2", 100, "Slope C 2", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 2, 0xcf); + public static final EnumShape SLOPE_TILE_C3 = addShape("SLOPE_TILE_C3", 101, "Slope C 3", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 3, 0x0f); + public static final EnumShape SLOPE_TILE_C4 = addShape("SLOPE_TILE_C4", 102, "Slope C 4", ShapeKind.Roof, + EnumShapeSymmetry.BILATERAL, 1, 4, 0x0f); /** * Essentially, this loads the class, allowing the above values to be added. @@ -37,11 +37,11 @@ public class LabsShapes { public static void preInit() {} @SuppressWarnings("SameParameterValue") - private static Shape addShape(String name, int id, String title, ShapeKind kind, ShapeSymmetry sym, int used, - int made, int occ) { - var shape = EnumHelper.addEnum(Shape.class, name, - new Class[] { int.class, String.class, ShapeKind.class, ShapeSymmetry.class, int.class, int.class, - int.class }, + private static EnumShape addShape(String name, int id, String title, ShapeKind kind, EnumShapeSymmetry sym, + int used, int made, int occ) { + var shape = EnumHelper.addEnum(EnumShape.class, name, + new Class[] { int.class, String.class, ShapeKind.class, EnumShapeSymmetry.class, int.class, + int.class, int.class }, id, title, kind, sym, used, made, occ); ShapeAccessor.getIDMap().put(id, shape); return shape; diff --git a/src/main/java/com/nomiceu/nomilabs/integration/effortlessbuilding/GenericReachUpgrade.java b/src/main/java/com/nomiceu/nomilabs/integration/effortlessbuilding/GenericReachUpgrade.java index d4746be9..1a54b145 100644 --- a/src/main/java/com/nomiceu/nomilabs/integration/effortlessbuilding/GenericReachUpgrade.java +++ b/src/main/java/com/nomiceu/nomilabs/integration/effortlessbuilding/GenericReachUpgrade.java @@ -16,7 +16,6 @@ import nl.requios.effortlessbuilding.BuildConfig; import nl.requios.effortlessbuilding.EffortlessBuilding; import nl.requios.effortlessbuilding.buildmodifier.ModifierSettingsManager; -import scala.Int; public class GenericReachUpgrade { @@ -91,6 +90,7 @@ public static void addInformation(List tooltip, int level) { } public static class ReachInfo { + // Uses Suppliers so that we can change configs on the fly private final Supplier distance; private final Supplier axis; diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/BlockSawbenchMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/BlockSawbenchMixin.java new file mode 100644 index 00000000..0e649871 --- /dev/null +++ b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/BlockSawbenchMixin.java @@ -0,0 +1,32 @@ +package com.nomiceu.nomilabs.mixin.architecturecraft; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; + +import org.spongepowered.asm.mixin.Mixin; + +import com.elytradev.architecture.common.block.BlockArchitecture; +import com.elytradev.architecture.common.block.BlockSawbench; +import com.elytradev.architecture.common.tile.TileSawbench; + +/** + * Fixes the Particle Texture of the Sawbench. + */ +@Mixin(value = BlockSawbench.class, remap = false) +public class BlockSawbenchMixin extends BlockArchitecture { + + /** + * Default Ignored Constructor + */ + public BlockSawbenchMixin(Material material) { + super(material); + } + + @Override + public IBlockState getParticleState(IBlockAccess world, BlockPos pos) { + return Blocks.IRON_BLOCK.getDefaultState(); + } +} diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/ShapeAccessor.java b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/ShapeAccessor.java index 452d938f..021025c1 100644 --- a/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/ShapeAccessor.java +++ b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/ShapeAccessor.java @@ -6,16 +6,16 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; -import com.elytradev.architecture.common.shape.Shape; +import com.elytradev.architecture.common.shape.EnumShape; /** * Allows accessing the protected static ID Map, which is used by Architecture Craft. */ -@Mixin(value = Shape.class, remap = false) +@Mixin(value = EnumShape.class, remap = false) public interface ShapeAccessor { @Accessor(value = "idMap") - static Map getIDMap() { + static Map getIDMap() { throw new NotImplementedException("ShapeAccessorMixin Failed to Apply!"); } } diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/TileSawbenchMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/TileSawbenchMixin.java index caa43935..a630a9a7 100644 --- a/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/TileSawbenchMixin.java +++ b/src/main/java/com/nomiceu/nomilabs/mixin/architecturecraft/TileSawbenchMixin.java @@ -5,7 +5,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.elytradev.architecture.common.shape.Shape; +import com.elytradev.architecture.common.shape.EnumShape; import com.elytradev.architecture.common.shape.ShapePage; import com.elytradev.architecture.common.tile.TileSawbench; import com.nomiceu.nomilabs.integration.architecturecraft.LabsShapes; @@ -20,96 +20,96 @@ public class TileSawbenchMixin { private static void changePages(CallbackInfo ci) { TileSawbench.pages = new ShapePage[] { new ShapePage("Roofing", - Shape.ROOF_TILE, - Shape.ROOF_OUTER_CORNER, - Shape.ROOF_INNER_CORNER, - Shape.ROOF_RIDGE, - Shape.ROOF_SMART_RIDGE, - Shape.ROOF_VALLEY, - Shape.ROOF_SMART_VALLEY, - Shape.ROOF_OVERHANG, - Shape.ROOF_OVERHANG_OUTER_CORNER, - Shape.ROOF_OVERHANG_INNER_CORNER, - Shape.ROOF_OVERHANG_GABLE_LH, - Shape.ROOF_OVERHANG_GABLE_RH, - Shape.ROOF_OVERHANG_GABLE_END_LH, - Shape.ROOF_OVERHANG_GABLE_END_RH, - Shape.ROOF_OVERHANG_RIDGE, - Shape.ROOF_OVERHANG_VALLEY, - Shape.BEVELLED_OUTER_CORNER, - Shape.BEVELLED_INNER_CORNER), + EnumShape.ROOF_TILE, + EnumShape.ROOF_OUTER_CORNER, + EnumShape.ROOF_INNER_CORNER, + EnumShape.ROOF_RIDGE, + EnumShape.ROOF_SMART_RIDGE, + EnumShape.ROOF_VALLEY, + EnumShape.ROOF_SMART_VALLEY, + EnumShape.ROOF_OVERHANG, + EnumShape.ROOF_OVERHANG_OUTER_CORNER, + EnumShape.ROOF_OVERHANG_INNER_CORNER, + EnumShape.ROOF_OVERHANG_GABLE_LH, + EnumShape.ROOF_OVERHANG_GABLE_RH, + EnumShape.ROOF_OVERHANG_GABLE_END_LH, + EnumShape.ROOF_OVERHANG_GABLE_END_RH, + EnumShape.ROOF_OVERHANG_RIDGE, + EnumShape.ROOF_OVERHANG_VALLEY, + EnumShape.BEVELLED_OUTER_CORNER, + EnumShape.BEVELLED_INNER_CORNER), new ShapePage("Rounded", - Shape.CYLINDER, - Shape.CYLINDER_HALF, - Shape.CYLINDER_QUARTER, - Shape.CYLINDER_LARGE_QUARTER, - Shape.ANTICYLINDER_LARGE_QUARTER, - Shape.PILLAR, - Shape.POST, - Shape.POLE, - Shape.SPHERE_FULL, - Shape.SPHERE_HALF, - Shape.SPHERE_QUARTER, - Shape.SPHERE_EIGHTH, - Shape.SPHERE_EIGHTH_LARGE, - Shape.SPHERE_EIGHTH_LARGE_REV), + EnumShape.CYLINDER, + EnumShape.CYLINDER_HALF, + EnumShape.CYLINDER_QUARTER, + EnumShape.CYLINDER_LARGE_QUARTER, + EnumShape.ANTICYLINDER_LARGE_QUARTER, + EnumShape.PILLAR, + EnumShape.POST, + EnumShape.POLE, + EnumShape.SPHERE_FULL, + EnumShape.SPHERE_HALF, + EnumShape.SPHERE_QUARTER, + EnumShape.SPHERE_EIGHTH, + EnumShape.SPHERE_EIGHTH_LARGE, + EnumShape.SPHERE_EIGHTH_LARGE_REV), new ShapePage("Classical", - Shape.PILLAR_BASE, - Shape.PILLAR, - Shape.DORIC_CAPITAL, - Shape.DORIC_TRIGLYPH, - Shape.DORIC_TRIGLYPH_CORNER, - Shape.DORIC_METOPE, - Shape.IONIC_CAPITAL, - Shape.CORINTHIAN_CAPITAL, - Shape.ARCHITRAVE, - Shape.ARCHITRAVE_CORNER, - Shape.CORNICE_LH, - Shape.CORNICE_RH, - Shape.CORNICE_END_LH, - Shape.CORNICE_END_RH, - Shape.CORNICE_RIDGE, - Shape.CORNICE_VALLEY, - Shape.CORNICE_BOTTOM), + EnumShape.PILLAR_BASE, + EnumShape.PILLAR, + EnumShape.DORIC_CAPITAL, + EnumShape.DORIC_TRIGLYPH, + EnumShape.DORIC_TRIGLYPH_CORNER, + EnumShape.DORIC_METOPE, + EnumShape.IONIC_CAPITAL, + EnumShape.CORINTHIAN_CAPITAL, + EnumShape.ARCHITRAVE, + EnumShape.ARCHITRAVE_CORNER, + EnumShape.CORNICE_LH, + EnumShape.CORNICE_RH, + EnumShape.CORNICE_END_LH, + EnumShape.CORNICE_END_RH, + EnumShape.CORNICE_RIDGE, + EnumShape.CORNICE_VALLEY, + EnumShape.CORNICE_BOTTOM), new ShapePage("Window", - Shape.WINDOW_FRAME, - Shape.WINDOW_CORNER, - Shape.WINDOW_MULLION), + EnumShape.WINDOW_FRAME, + EnumShape.WINDOW_CORNER, + EnumShape.WINDOW_MULLION), new ShapePage("Arches", - Shape.ARCH_D_1, - Shape.ARCH_D_2, - Shape.ARCH_D_3_A, - Shape.ARCH_D_3_B, - Shape.ARCH_D_3_C, - Shape.ARCH_D_4_A, - Shape.ARCH_D_4_B, - Shape.ARCH_D_4_C), + EnumShape.ARCH_D_1, + EnumShape.ARCH_D_2, + EnumShape.ARCH_D_3_A, + EnumShape.ARCH_D_3_B, + EnumShape.ARCH_D_3_C, + EnumShape.ARCH_D_4_A, + EnumShape.ARCH_D_4_B, + EnumShape.ARCH_D_4_C), new ShapePage("Railings", - Shape.BALUSTRADE_PLAIN, - Shape.BALUSTRADE_PLAIN_OUTER_CORNER, - Shape.BALUSTRADE_PLAIN_INNER_CORNER, - Shape.BALUSTRADE_PLAIN_WITH_NEWEL, - Shape.BALUSTRADE_PLAIN_END, - Shape.BANISTER_PLAIN_TOP, - Shape.BANISTER_PLAIN, - Shape.BANISTER_PLAIN_BOTTOM, - Shape.BANISTER_PLAIN_END, - Shape.BANISTER_PLAIN_INNER_CORNER, - Shape.BALUSTRADE_FANCY, - Shape.BALUSTRADE_FANCY_CORNER, - Shape.BALUSTRADE_FANCY_WITH_NEWEL, - Shape.BALUSTRADE_FANCY_NEWEL, - Shape.BANISTER_FANCY_TOP, - Shape.BANISTER_FANCY, - Shape.BANISTER_FANCY_BOTTOM, - Shape.BANISTER_FANCY_END, - Shape.BANISTER_FANCY_NEWEL_TALL), + EnumShape.BALUSTRADE_PLAIN, + EnumShape.BALUSTRADE_PLAIN_OUTER_CORNER, + EnumShape.BALUSTRADE_PLAIN_INNER_CORNER, + EnumShape.BALUSTRADE_PLAIN_WITH_NEWEL, + EnumShape.BALUSTRADE_PLAIN_END, + EnumShape.BANISTER_PLAIN_TOP, + EnumShape.BANISTER_PLAIN, + EnumShape.BANISTER_PLAIN_BOTTOM, + EnumShape.BANISTER_PLAIN_END, + EnumShape.BANISTER_PLAIN_INNER_CORNER, + EnumShape.BALUSTRADE_FANCY, + EnumShape.BALUSTRADE_FANCY_CORNER, + EnumShape.BALUSTRADE_FANCY_WITH_NEWEL, + EnumShape.BALUSTRADE_FANCY_NEWEL, + EnumShape.BANISTER_FANCY_TOP, + EnumShape.BANISTER_FANCY, + EnumShape.BANISTER_FANCY_BOTTOM, + EnumShape.BANISTER_FANCY_END, + EnumShape.BANISTER_FANCY_NEWEL_TALL), new ShapePage("Other", - Shape.CLADDING_SHEET, - Shape.SLAB, - Shape.STAIRS, - Shape.STAIRS_OUTER_CORNER, - Shape.STAIRS_INNER_CORNER, + EnumShape.CLADDING_SHEET, + EnumShape.SLAB, + EnumShape.STAIRS, + EnumShape.STAIRS_OUTER_CORNER, + EnumShape.STAIRS_INNER_CORNER, LabsShapes.SLOPE_TILE_A1, LabsShapes.SLOPE_TILE_A2, LabsShapes.SLOPE_TILE_B1, diff --git a/src/main/java/com/nomiceu/nomilabs/mixin/topaddons/AddonArchitectureCraftMixin.java b/src/main/java/com/nomiceu/nomilabs/mixin/topaddons/AddonArchitectureCraftMixin.java new file mode 100644 index 00000000..f15b8746 --- /dev/null +++ b/src/main/java/com/nomiceu/nomilabs/mixin/topaddons/AddonArchitectureCraftMixin.java @@ -0,0 +1,29 @@ +package com.nomiceu.nomilabs.mixin.topaddons; + +import net.minecraft.item.ItemStack; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import com.elytradev.architecture.common.shape.EnumShape; +import com.nomiceu.nomilabs.util.LabsTranslate; + +import io.github.drmanganese.topaddons.addons.AddonArchitectureCraft; + +@Mixin(value = AddonArchitectureCraft.class, remap = false) +public class AddonArchitectureCraftMixin { + + /** + * Overwrites the {@link AddonArchitectureCraft#getShapeName(ItemStack)}. + * + * @author IntegerLimit_ + * @reason It uses the old Shape Class. Overwriting instead of Injecting will hopefully make sure the class does NOT + * get loaded, causing a ClassNotFoundException. + */ + @Overwrite + private static String getShapeName(ItemStack stack) { + var compound = stack.getTagCompound(); + return LabsTranslate + .translate(EnumShape.forId(compound == null ? 0 : compound.getInteger("Shape")).translationKey); + } +} diff --git a/src/main/resources/assets/nomilabs/lang/en_us.lang b/src/main/resources/assets/nomilabs/lang/en_us.lang index 7da9acfe..b756556b 100644 --- a/src/main/resources/assets/nomilabs/lang/en_us.lang +++ b/src/main/resources/assets/nomilabs/lang/en_us.lang @@ -40,6 +40,7 @@ config.nomilabs.mod_integration.default_world_gen=Enable Default World Generator config.nomilabs.mod_integration.ender_storage=Enable Ender Storage Integration config.nomilabs.mod_integration.ender_io=Enable Ender IO Integration config.nomilabs.mod_integration.ftb_utils=Enable FTB Utilities Integration +config.nomilabs.mod_integration.top_addons=Enable TOP Addons Integration config.nomilabs.mod_integration.effortlessbuilding=Effortless Building Integration Settings config.nomilabs.mod_integration.effortlessbuilding.enable=Enable Effortless Building Integration diff --git a/src/main/resources/mixins.nomilabs.architecturecraft.json b/src/main/resources/mixins.nomilabs.architecturecraft.json index 8a672c38..97c5bca6 100644 --- a/src/main/resources/mixins.nomilabs.architecturecraft.json +++ b/src/main/resources/mixins.nomilabs.architecturecraft.json @@ -5,6 +5,7 @@ "minVersion": "0.8", "compatibilityLevel": "JAVA_8", "mixins": [ + "BlockSawbenchMixin", "ShapeAccessor", "TileSawbenchMixin" ], diff --git a/src/main/resources/mixins.nomilabs.topaddons.json b/src/main/resources/mixins.nomilabs.topaddons.json new file mode 100644 index 00000000..94f06276 --- /dev/null +++ b/src/main/resources/mixins.nomilabs.topaddons.json @@ -0,0 +1,12 @@ +{ + "package": "com.nomiceu.nomilabs.mixin.topaddons", + "refmap": "mixins.nomilabs.refmap.json", + "target": "@env(DEFAULT)", + "minVersion": "0.8", + "compatibilityLevel": "JAVA_8", + "mixins": [ + "AddonArchitectureCraftMixin" + ], + "client": [], + "server": [] +}