Skip to content

Commit 2f29d1e

Browse files
committed
Add Large Rock Breaker
1 parent bc81504 commit 2f29d1e

File tree

9 files changed

+181
-18
lines changed

9 files changed

+181
-18
lines changed

dependencies.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ dependencies {
143143

144144
// Debug GTFO
145145
if (project.debug_all.toBoolean() || project.debug_gtfo.toBoolean()) {
146-
runtimeOnlyNonPublishable rfg.deobf("curse.maven:gregtech-food-option-477021:5487400") // GTFO 1.11.2.1
146+
runtimeOnlyNonPublishable rfg.deobf("curse.maven:gregtech-food-option-477021:6147619") // GTFO 1.12.4
147147
}
148148

149149
// Boot error fix

src/main/java/com/github/gtexpert/core/common/GTEConfigHolder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public static class ModpackFlag {
4141
@Config.Comment({
4242
"1. When enabled, the following recipes will be changed to Peaceful difficulty: ",
4343
"Nether Star Dust, Skeleton Skull, Wither Skeleton Skull, Zombie Head, Creeper Head, Enderman Head",
44+
"2. When enabled, some machine recipes are for Peaceful: ",
45+
"Electric Spawner",
4446
"Default: false" })
4547
public boolean peacefulFlag = false;
4648

src/main/java/com/github/gtexpert/core/common/metatileentities/GTEMetaTileEntities.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class GTEMetaTileEntities {
1919
// Single Machine
2020

2121
// Multi Machine
22+
public static MetaTileEntityLargeRockBreaker LARGE_ROCK_BREAKER;
2223
public static MetaTileEntityLargeCrackingUnit LARGE_CRACKER;
2324
public static MetaTileEntityVoidOreMiner VOIDOREMINER;
2425
public static MetaTileEntityAdvancedChemicalPlant ADVANCED_CHEMICAL_PLANT;
@@ -29,7 +30,8 @@ public static void init() {
2930
// Free: 11004~11999
3031

3132
// Multi Machine
32-
// Free: 12000~12001
33+
LARGE_ROCK_BREAKER = registerMetaTileEntity(12001,
34+
new MetaTileEntityLargeRockBreaker(gteId("large_rock_breaker")));
3335
LARGE_CRACKER = registerMetaTileEntity(12002,
3436
new MetaTileEntityLargeCrackingUnit(gteId("large_cracking_unit")));
3537
VOIDOREMINER = registerMetaTileEntity(12003,
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
package com.github.gtexpert.core.common.metatileentities.multi;
2+
3+
import java.util.List;
4+
5+
import gregtech.api.metatileentity.multiblock.MultiblockAbility;
6+
import gregtech.common.blocks.BlockBoilerCasing;
7+
8+
import net.minecraft.block.state.IBlockState;
9+
import net.minecraft.client.resources.I18n;
10+
import net.minecraft.item.ItemStack;
11+
import net.minecraft.util.ResourceLocation;
12+
import net.minecraft.util.SoundEvent;
13+
import net.minecraft.world.World;
14+
import net.minecraftforge.fml.relauncher.Side;
15+
import net.minecraftforge.fml.relauncher.SideOnly;
16+
17+
import org.jetbrains.annotations.NotNull;
18+
import org.jetbrains.annotations.Nullable;
19+
20+
import gregtech.api.gui.resources.TextureArea;
21+
import gregtech.api.metatileentity.MetaTileEntity;
22+
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
23+
import gregtech.api.metatileentity.multiblock.IMultiblockPart;
24+
import gregtech.api.pattern.BlockPattern;
25+
import gregtech.api.pattern.FactoryBlockPattern;
26+
import gregtech.api.pattern.TraceabilityPredicate;
27+
import gregtech.api.recipes.RecipeMaps;
28+
import gregtech.client.renderer.ICubeRenderer;
29+
import gregtech.client.renderer.texture.Textures;
30+
import gregtech.common.blocks.BlockMetalCasing;
31+
import gregtech.common.blocks.MetaBlocks;
32+
import gregtech.core.sound.GTSoundEvents;
33+
34+
import gregicality.multiblocks.api.metatileentity.GCYMRecipeMapMultiblockController;
35+
36+
import com.github.gtexpert.core.api.gui.GTEGuiTextures;
37+
38+
public class MetaTileEntityLargeRockBreaker extends GCYMRecipeMapMultiblockController {
39+
40+
public MetaTileEntityLargeRockBreaker(ResourceLocation metaTileEntityId) {
41+
super(metaTileEntityId, RecipeMaps.ROCK_BREAKER_RECIPES);
42+
}
43+
44+
@Override
45+
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
46+
return new MetaTileEntityLargeRockBreaker(metaTileEntityId);
47+
}
48+
49+
@NotNull
50+
@Override
51+
protected BlockPattern createStructurePattern() {
52+
TraceabilityPredicate casing = states(getCasingState());
53+
TraceabilityPredicate abilities = autoAbilities(true, true, true, true, false, false, false);
54+
return FactoryBlockPattern.start()
55+
.aisle("CXXXC", "CXXXC", "C C", "C C", "C C", "CCCCC", " C ", " ")
56+
.aisle("XCCCX", "X X", " ", " P ", " P ", "CPPPC", " CPC ", " C ")
57+
.aisle("XCCCX", "X X", " C ", " PCP ", " PCP ", "CPCPC", "CP#PC", " CHC ")
58+
.aisle("XCCCX", "X X", " ", " P ", " P ", "CPPPC", " CPC ", " C ")
59+
.aisle("CXTXC", "CXSXC", "C C", "C C", "C C", "CCCCC", " C ", " ")
60+
.where('S', selfPredicate())
61+
.where('C', casing)
62+
.where('X', casing.or(abilities))
63+
.where('P', states(getPipeCasingState()))
64+
.where('T', tieredCasing().or(states(getCasingState())))
65+
.where('H', abilities(MultiblockAbility.MUFFLER_HATCH))
66+
.where('#', air())
67+
.where(' ', any())
68+
.build();
69+
}
70+
71+
@Override
72+
public boolean allowsExtendedFacing() {
73+
return false;
74+
}
75+
76+
@Override
77+
public boolean allowsFlip() {
78+
return false;
79+
}
80+
81+
@Override
82+
public boolean isTiered() {
83+
return true;
84+
}
85+
86+
@Override
87+
public boolean canBeDistinct() {
88+
return true;
89+
}
90+
91+
@Override
92+
public boolean isParallel() {
93+
return true;
94+
}
95+
96+
@SideOnly(Side.CLIENT)
97+
@Override
98+
public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) {
99+
return Textures.SOLID_STEEL_CASING;
100+
}
101+
102+
protected IBlockState getPipeCasingState() {
103+
return MetaBlocks.BOILER_CASING.getState(BlockBoilerCasing.BoilerCasingType.STEEL_PIPE);
104+
}
105+
106+
protected IBlockState getCasingState() {
107+
return MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID);
108+
}
109+
110+
@Override
111+
public SoundEvent getBreakdownSound() {
112+
return GTSoundEvents.BREAKDOWN_ELECTRICAL;
113+
}
114+
115+
@Override
116+
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) {
117+
super.addInformation(stack, player, tooltip, advanced);
118+
tooltip.add(I18n.format("gtexpert.machine.large_rock_breaker.tooltip.1"));
119+
}
120+
121+
@Override
122+
protected @NotNull TextureArea getLogo() {
123+
return GTEGuiTextures.GTE_LOGO_DARK;
124+
}
125+
126+
@Override
127+
protected @NotNull TextureArea getWarningLogo() {
128+
return GTEGuiTextures.GTE_LOGO_BLINKING_YELLOW;
129+
}
130+
131+
@Override
132+
protected @NotNull TextureArea getErrorLogo() {
133+
return GTEGuiTextures.GTE_LOGO_BLINKING_RED;
134+
}
135+
136+
@SideOnly(Side.CLIENT)
137+
@NotNull
138+
@Override
139+
protected ICubeRenderer getFrontOverlay() {
140+
return Textures.ROCK_BREAKER_OVERLAY;
141+
}
142+
}

src/main/java/com/github/gtexpert/core/integration/eio/recipes/EIOBlocksRecipe.java

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,25 @@ public static void init() {
8787
'Z', "skullZombieController");
8888

8989
// Electric Spawner
90-
MetaTileEntityLoader.registerMachineRecipe(true,
91-
EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC",
92-
'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy),
93-
'E', "skullSentientEnder",
94-
'S', new UnificationEntry(plate, GTEMaterials.Soularium),
95-
'H', HULL,
96-
'C', "itemEnderCrystal",
97-
'Z', "skullZombieFrankenstein");
90+
if (GTEConfigHolder.gteFlag.peacefulFlag) {
91+
MetaTileEntityLoader.registerMachineRecipe(true,
92+
EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC",
93+
'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy),
94+
'E', "skullEnderResonator",
95+
'S', new UnificationEntry(plate, GTEMaterials.Soularium),
96+
'H', HULL,
97+
'C', "itemEnderCrystal",
98+
'Z', "skullZombieController");
99+
} else {
100+
MetaTileEntityLoader.registerMachineRecipe(true,
101+
EIOMetaTileEntities.ELECTRIC_SPAWNER, "PEP", "SHS", "CZC",
102+
'P', new UnificationEntry(plate, GTEMaterials.ConstructionAlloy),
103+
'E', "skullSentientEnder",
104+
'S', new UnificationEntry(plate, GTEMaterials.Soularium),
105+
'H', HULL,
106+
'C', "itemEnderCrystal",
107+
'Z', "skullZombieFrankenstein");
108+
}
98109

99110
if (EnderIOConfigHolder.addShapelessRecipeMachines) {
100111
// Slice'N'Splice

src/main/java/com/github/gtexpert/core/loaders/recipe/GTERecipe.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,14 @@ private static void items() {
762762
}
763763

764764
private static void blocks() {
765+
// Large Rock Breaker
766+
ModHandler.addShapedRecipe(true, "gtexpert.machine.large_rock_breaker",
767+
GTEMetaTileEntities.LARGE_ROCK_BREAKER.getStackForm(), "PCP", "MSM", "PCP",
768+
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.LuV),
769+
'S', MetaTileEntities.ROCK_BREAKER[LuV].getStackForm(),
770+
'P', MetaItems.ELECTRIC_PISTON_LUV.getStackForm(),
771+
'M', MetaItems.ELECTRIC_MOTOR_LuV.getStackForm());
772+
765773
// Large Oil Cracking Unit
766774
ModHandler.addShapedRecipe(true, "gtexpert.machine.large_oil_cracking_unit",
767775
GTEMetaTileEntities.LARGE_CRACKER.getStackForm(), "PCP", "FSF", "PCP",

src/main/resources/assets/gtexpert/lang/en_us.lang

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33

44
# multiblock
5-
gtexpert.machine.sawmill.name=Sawmill
6-
gtexpert.machine.sawmill.tooltip=Nooo! Do not saw me..
7-
gtexpert.machine.sawmill.tooltip.1=§dAuthor:§f @Quarri6343
5+
gtexpert.machine.large_rock_breaker.name=Large Rock Breaker
6+
gtexpert.machine.large_rock_breaker.tooltip=I want to destroy that thing and that thing
7+
gtexpert.machine.large_rock_breaker.tooltip.1=§dAuthor:§f @tier940
88
gtexpert.machine.void_ore_miner.name=Void Ore Miner
99
gtexpert.machine.void_ore_miner.tooltip=Stargate Builder
1010
gtexpert.machine.void_ore_miner.tooltip.1=§6Mines out 32 Ores based on the input Ore §r

src/main/resources/assets/gtexpert/lang/ja_jp.lang

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33

44
# multiblock
5-
gtexpert.machine.sawmill.name=製材機
6-
gtexpert.machine.sawmill.tooltip=うるさいからって電話を伐らないで..
7-
gtexpert.machine.sawmill.tooltip.1=§d作者:§f @Quarri6343
5+
gtexpert.machine.large_rock_breaker.name=大型破砕機
6+
gtexpert.machine.large_rock_breaker.tooltip=アレもコレも壊したい
7+
gtexpert.machine.large_rock_breaker.tooltip.1=§d作者:§f @tier940
88
gtexpert.machine.void_ore_miner.name=亜空間型鉱石採掘機
99
gtexpert.machine.void_ore_miner.tooltip=スターゲート建設機
1010
gtexpert.machine.void_ore_miner.tooltip.1=§6搬入された鉱石に基づいて32個の鉱石を掘り出します§r

src/main/resources/assets/gtexpert/lang/zh_cn.lang

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# 中文翻译由 Quarri6343 翻译。
33

44
# multiblock
5-
gtexpert.machine.sawmill.name=锯木机
6-
gtexpert.machine.sawmill.tooltip=Nooooo!不要砍我...
75
gtexpert.machine.void_ore_miner.name=虚空矿物采掘机
86
gtexpert.machine.void_ore_miner.tooltip=星门建造机
97
gtexpert.machine.void_ore_miner.tooltip.1=§6采掘32个矿石基于输入的矿石§r

0 commit comments

Comments
 (0)