Skip to content

Commit 0eef74b

Browse files
author
tier940
authored
Add Chisel integration (#77)
1 parent 522d523 commit 0eef74b

24 files changed

Lines changed: 405 additions & 18 deletions

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ dependencies {
138138
implementation rfg.deobf("curse.maven:draconicadditions-${dra_pid}:${dra_fid}")
139139
}
140140

141+
// Debug Chisel
142+
compileOnlyApi rfg.deobf("curse.maven:chisel-${chi_pid}:${chi_fid}")
143+
if (project.debug_chisel.toBoolean()) {
144+
implementation rfg.deobf("curse.maven:chisel-${chi_pid}:${chi_fid}")
145+
}
146+
141147
// GroovyScript dependency
142148
implementation "zone.rong:mixinbooter:${mixinbooter_version}"
143149

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ dre_pid = 223565
6161
dre_fid = 3431261
6262
dra_pid = 314515
6363
dra_fid = 3514704
64+
chi_pid = 235279
65+
chi_fid = 2915375
6466
jei_version = 4.16.1.302
6567
crt_version = 4.1.20.687
6668
top_pid = 245211
@@ -72,6 +74,7 @@ grs_fid = 4399621
7274

7375
# Debug mod compatibility
7476
debug_de = false
77+
debug_chisel = false
7578

7679
## Assetmover Dependencies
7780
assetmover_version = 2.0

src/main/java/gtexpert/api/GTEValues.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public class GTEValues {
1414
MODID_AE = "appliedenergistics2",
1515
MODID_AEA = "aeadditions",
1616
MODID_DE = "draconicevolution",
17-
MODID_DA = "draconicadditions";
17+
MODID_DA = "draconicadditions",
18+
MODID_CHISEL = "chisel";
1819
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package gtexpert.api.capability;
2+
3+
import gregtech.api.capability.IEnergyContainer;
4+
import gregtech.api.capability.impl.RecipeLogicEnergy;
5+
import gregtech.api.metatileentity.MetaTileEntity;
6+
import gregtech.api.recipes.RecipeMap;
7+
8+
import java.util.function.Supplier;
9+
10+
public class SingleblockRecipeLogicNoCache extends RecipeLogicEnergy {
11+
public SingleblockRecipeLogicNoCache(MetaTileEntity tileEntity, RecipeMap<?> recipeMap,
12+
Supplier<IEnergyContainer> energyContainer) {
13+
super(tileEntity, recipeMap, energyContainer);
14+
}
15+
16+
@Override
17+
protected boolean checkPreviousRecipe() {
18+
return false;
19+
}
20+
}

src/main/java/gtexpert/api/gui/GTEGuiTextures.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
public class GTEGuiTextures {
66
public static final TextureArea GTEXPERT_CORE_LOGO = TextureArea.fullImage("textures/gui/icon/gtexpert_core_logo.png");
77
public static final TextureArea PROGRESS_BAR_VOID = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_void.png");
8+
public static final TextureArea PROGRESS_BAR_CHISEL = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_chisel.png");
89
public static final TextureArea SOULVIAL_EMPTY_OVRELAY = TextureArea.fullImage("textures/gui/overlay/soul_vial_e_overlay.png");
910
public static final TextureArea SOULVIAL_FULL_OVERLAY = TextureArea.fullImage("textures/gui/overlay/soul_vial_f_overlay.png");
1011
}

src/main/java/gtexpert/api/recipes/GTERecipeMaps.java

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,30 @@ public class GTERecipeMaps {
2020
.setProgressBar(GuiTextures.PROGRESS_BAR_MIXER, ProgressWidget.MoveType.CIRCULAR)
2121
.setSound(GTSoundEvents.MIXER);
2222

23+
@ZenProperty
24+
public static final RecipeMap<SimpleRecipeBuilder> AUTO_CHISEL_RECIPES = new RecipeMap<>("auto_chisel", 2, 9, 0, 0, new SimpleRecipeBuilder(), false)
25+
.setSlotOverlay(false, false, false, GuiTextures.BOXED_BACKGROUND)
26+
.setProgressBar(GTEGuiTextures.PROGRESS_BAR_CHISEL, ProgressWidget.MoveType.HORIZONTAL)
27+
.setSound(GTSoundEvents.FILE_TOOL);
28+
2329
@ZenProperty
2430
public static final RecipeMap<SimpleRecipeBuilder> VIAL_EXTRACTOR_RECIPES = new RecipeMap<>("vial_extractor", 1, 4, 0, 1, new SimpleRecipeBuilder(), false)
2531
.setSlotOverlay(false, false, GTEGuiTextures.SOULVIAL_FULL_OVERLAY)
2632
.setProgressBar(GuiTextures.PROGRESS_BAR_EXTRACT, ProgressWidget.MoveType.HORIZONTAL)
2733
.setSound(GTSoundEvents.COMPRESSOR);
2834

35+
@ZenProperty
36+
public static final RecipeMap<SimpleRecipeBuilder> SLICE_N_SPLICE_RECIPES = new RecipeMap<>("slice'n'splice", 6, 1, 0, 0, new SimpleRecipeBuilder(), false)
37+
.setProgressBar(GuiTextures.PROGRESS_BAR_SLICE, ProgressWidget.MoveType.HORIZONTAL)
38+
.setSound(GTSoundEvents.CUT);
39+
40+
@ZenProperty
41+
public static final RecipeMap<SimpleRecipeBuilder> SOUL_BINDER_RECIPES = new RecipeMap<>("soul_binder", 2, 2, 1, 0, new SimpleRecipeBuilder(), false)
42+
.setSlotOverlay(false, false, false, GTEGuiTextures.SOULVIAL_FULL_OVERLAY)
43+
.setSlotOverlay(true, false, false, GTEGuiTextures.SOULVIAL_EMPTY_OVRELAY)
44+
.setProgressBar(GuiTextures.PROGRESS_BAR_CANNER, ProgressWidget.MoveType.HORIZONTAL)
45+
.setSound(GTSoundEvents.ASSEMBLER);
46+
2947
@ZenProperty
3048
public static final RecipeMap<SimpleRecipeBuilder> SAWMILL_RECIPES = new RecipeMap<>("sawmill", 2, 2, 1, 0, new SimpleRecipeBuilder(), false)
3149
.setSlotOverlay(false, false, GuiTextures.SAWBLADE_OVERLAY)
@@ -38,15 +56,4 @@ public class GTERecipeMaps {
3856
public static final RecipeMap<SimpleRecipeBuilder> VOID_ORE_MINER_RECIPES = new RecipeMap<>("void_ore_miner", 1, 1, 2, 0, new SimpleRecipeBuilder(), false)
3957
.setProgressBar(GTEGuiTextures.PROGRESS_BAR_VOID, ProgressWidget.MoveType.VERTICAL)
4058
.setSound(GTSoundEvents.DRILL_TOOL);
41-
42-
@ZenProperty
43-
public static final RecipeMap<SimpleRecipeBuilder> SLICE_N_SPLICE_RECIPES = new RecipeMap<>("slice'n'splice", 6, 1, 0, 0, new SimpleRecipeBuilder(), false)
44-
.setProgressBar(GuiTextures.PROGRESS_BAR_SLICE, ProgressWidget.MoveType.HORIZONTAL)
45-
.setSound(GTSoundEvents.CUT);
46-
47-
public static final RecipeMap<SimpleRecipeBuilder> SOUL_BINDER_RECIPES = new RecipeMap<>("soul_binder", 2, 2, 1, 0, new SimpleRecipeBuilder(), false)
48-
.setSlotOverlay(false, false, false, GTEGuiTextures.SOULVIAL_FULL_OVERLAY)
49-
.setSlotOverlay(true, false, false, GTEGuiTextures.SOULVIAL_EMPTY_OVRELAY)
50-
.setProgressBar(GuiTextures.PROGRESS_BAR_CANNER, ProgressWidget.MoveType.HORIZONTAL)
51-
.setSound(GTSoundEvents.ASSEMBLER);
5259
}

src/main/java/gtexpert/client/GTETextures.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package gtexpert.client;
22

3+
import gregtech.client.renderer.ICubeRenderer;
34
import gregtech.client.renderer.texture.cube.*;
45
import gtexpert.api.GTEValues;
56
import net.minecraftforge.fml.common.Mod;
@@ -10,6 +11,7 @@ public class GTETextures {
1011
public static SimpleOverlayRenderer SAWMILL_CASING;
1112
public static OrientedOverlayRenderer SAWMILL_OVERLAY = new OrientedOverlayRenderer("sawmill");
1213
public static OrientedOverlayRenderer EXTREME_MIXER_OVERLAY = new OrientedOverlayRenderer("extreme_mixer");
14+
public static OrientedOverlayRenderer AUTO_CHISEL_OVERLAY = new OrientedOverlayRenderer("auto_chisel");
1315
public static OrientedOverlayRenderer VIAL_EXTRACTOR_OVERLAY = new OrientedOverlayRenderer("vial_extractor");
1416
public static OrientedOverlayRenderer SLICE_N_SPLICE_OVERLAY = new OrientedOverlayRenderer("slice_n_splice");
1517
public static OrientedOverlayRenderer SOUL_BINDER_OVERLAY = new OrientedOverlayRenderer("soul_binder");

src/main/java/gtexpert/common/CommonProxy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,8 @@ public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
9090
if (Loader.isModLoaded(GTEValues.MODID_GTFO)) {
9191
GTFORecipeLoader.init();
9292
}
93+
if (Loader.isModLoaded(GTEValues.MODID_CHISEL)) {
94+
ChiselRecipeLoader.init();
95+
}
9396
}
9497
}

src/main/java/gtexpert/common/metatileentities/GTEMetaTileEntities.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
import net.minecraftforge.fml.common.Loader;
1313
import org.jetbrains.annotations.NotNull;
1414

15-
import static gregtech.api.GTValues.ZPM;
15+
import static gregtech.api.GTValues.*;
1616
import static gregtech.common.metatileentities.MetaTileEntities.*;
1717

1818
public class GTEMetaTileEntities {
19-
public static final MetaTileEntityExtremeMixer[] EXTREME_MIXER = new MetaTileEntityExtremeMixer[ZPM];
19+
public static final MetaTileEntityExtremeMixer[] EXTREME_MIXER = new MetaTileEntityExtremeMixer[1];
20+
public static final MetaTileEntityAutoChisel[] AUTO_CHISEL = new MetaTileEntityAutoChisel[3];
2021
public static MetaTileEntitySawmill SAWMILL;
2122
public static SimpleMachineMetaTileEntity[] VIAL_EXTRACTOR = new SimpleMachineMetaTileEntity[GTValues.V.length - 1];
2223
public static SimpleMachineMetaTileEntity[] SLICE_N_SPLICE = new SimpleMachineMetaTileEntity[GTValues.V.length - 1];
@@ -49,6 +50,11 @@ public static void init() {
4950
*/
5051

5152
// blocks :11001~
53+
// AUTO_CHISEL 11001~11003
54+
AUTO_CHISEL[0] = registerMetaTileEntity(11001, new MetaTileEntityAutoChisel(gteId("auto_chisel.lv"), GTERecipeMaps.AUTO_CHISEL_RECIPES, GTETextures.AUTO_CHISEL_OVERLAY, LV, true, GTUtility.defaultTankSizeFunction));
55+
AUTO_CHISEL[1] = registerMetaTileEntity(11002, new MetaTileEntityAutoChisel(gteId("auto_chisel.mv"), GTERecipeMaps.AUTO_CHISEL_RECIPES, GTETextures.AUTO_CHISEL_OVERLAY, MV, true, GTUtility.defaultTankSizeFunction));
56+
AUTO_CHISEL[2] = registerMetaTileEntity(11003, new MetaTileEntityAutoChisel(gteId("auto_chisel.hv"), GTERecipeMaps.AUTO_CHISEL_RECIPES, GTETextures.AUTO_CHISEL_OVERLAY, HV, true, GTUtility.defaultTankSizeFunction));
57+
5258
// EXTREME_MIXER 11007
5359
EXTREME_MIXER[0] = registerMetaTileEntity(11007, new MetaTileEntityExtremeMixer(gteId("extreme_mixer"), GTERecipeMaps.EXTREME_MIXER_RECIPES, GTETextures.EXTREME_MIXER_OVERLAY, ZPM, true, GTUtility.hvCappedTankSizeFunction));
5460

src/main/java/gtexpert/common/metatileentities/multi/MetaTileEntityDraconiumFusion.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.util.List;
2424

2525
public abstract class MetaTileEntityDraconiumFusion extends RecipeMapMultiblockController {
26-
2726
public MetaTileEntityDraconiumFusion(ResourceLocation metaTileEntityId, RecipeMap<?> recipeMap) {
2827
super(metaTileEntityId, recipeMap);
2928
this.recipeMapWorkable = new MultiblockRecipeLogicNoCache(this);

0 commit comments

Comments
 (0)