Skip to content

Commit

Permalink
Architecture Craft 3.108 Compat
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Mar 30, 2024
1 parent 9c8b483 commit b839785
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 104 deletions.
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,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
Expand Down Expand Up @@ -184,7 +184,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()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.nomiceu.nomilabs.integration.architecturecraft;

import com.elytradev.architecture.common.shape.Shape;
import com.elytradev.architecture.common.shape.EnumShape;
import com.elytradev.architecture.common.shape.ShapeKind;
import com.elytradev.architecture.common.shape.ShapeSymmetry;
import com.elytradev.architecture.common.shape.EnumShapeSymmetry;
import com.nomiceu.nomilabs.mixin.architecturecraft.ShapeAccessor;
import net.minecraftforge.common.util.EnumHelper;

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.
Expand All @@ -27,9 +27,9 @@ 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.nomiceu.nomilabs.mixin.architecturecraft;

import com.elytradev.architecture.common.shape.Shape;
import com.elytradev.architecture.common.shape.EnumShape;
import org.apache.commons.lang3.NotImplementedException;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
Expand All @@ -10,10 +10,10 @@
/**
* 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<Integer, Shape> getIDMap() {
static Map<Integer, EnumShape> getIDMap() {
throw new NotImplementedException("ShapeAccessorMixin Failed to Apply!");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.nomiceu.nomilabs.mixin.architecturecraft;

import com.elytradev.architecture.common.shape.Shape;
import com.elytradev.architecture.common.shape.EnumShape;
import com.elytradev.architecture.common.tile.TileSawbench;
import com.nomiceu.nomilabs.integration.architecturecraft.LabsShapes;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -19,96 +19,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,
Expand Down

0 comments on commit b839785

Please sign in to comment.