Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

New shapes for multiblocks #74

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class GCYSMetaTileEntities {
public static MetaTileEntityAxialCompressor SUPERSONIC_AXIAL_COMPRESSOR;
public static MetaTileEntityTurbomolecularPump LOW_POWER_TURBOMOLECULAR_PUMP;
public static MetaTileEntityTurbomolecularPump HIGH_POWER_TURBOMOLECULAR_PUMP;
public static MetaTileEntityPlasmaCVDUnit PLASMA_CVD_UNIT;

public static void init() {
// GCYM Machines: ID 2000-2099
Expand Down Expand Up @@ -86,8 +87,10 @@ public static void init() {
SUPERSONIC_AXIAL_COMPRESSOR = registerMetaTileEntity(3912, new MetaTileEntityAxialCompressor(gcysId("axial_compressor.supersonic"), GTValues.LuV, 18E9, 50_000.0));
LOW_POWER_TURBOMOLECULAR_PUMP = registerMetaTileEntity(3913, new MetaTileEntityTurbomolecularPump(gcysId("turbomolecular_pump.low_power"), GTValues.EV, 1E-4, 10_000.0));
HIGH_POWER_TURBOMOLECULAR_PUMP = registerMetaTileEntity(3914, new MetaTileEntityTurbomolecularPump(gcysId("turbomolecular_pump.high_power"), GTValues.LuV, 1E-7, 50_000.0));
PLASMA_CVD_UNIT = registerMetaTileEntity(3915, new MetaTileEntityPlasmaCVDUnit(gcysId("plasma_cvd_unit")));
}


@Nonnull
private static ResourceLocation gcysId(String name) {
return new ResourceLocation(GregicalityScience.MODID, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity iGregTechTileEnti
protected BlockPattern createStructurePattern() {
return FactoryBlockPattern.start()
.aisle("F F", "F X F", "FXXXF", "F X F", "F F", " ")
.aisle(" X ", " XCX ", "XCCCX", " XCX ", " X ", " X ")
.aisle(" XXX ", "XCCCX", "XK#KX", "XC#CX", " XCX ", " XMX ")
.aisle(" X ", " XCX ", "XCCCX", " XCX ", " M ", " X ")
.aisle(" XXX ", "XCCCX", "XK#KX", "XC#CX", " XCX ", " XXX ")
.aisle(" X ", " XCX ", "XCCCX", " XCX ", " X ", " X ")
.aisle("F F", "F X F", "FXSXF", "F X F", "F F", " ")
.where('S', selfPredicate())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gregicality.science.client.render.GCYSTextures;
import gregicality.science.common.block.GCYSMetaBlocks;
import gregicality.science.common.block.blocks.BlockGCYSMultiblockCasing;
import gregicality.science.common.block.blocks.BlockTransparentCasing;
import gregtech.api.capability.impl.MultiblockRecipeLogic;
import gregtech.api.capability.impl.NotifiableItemStackHandler;
import gregtech.api.metatileentity.MetaTileEntity;
Expand All @@ -18,13 +19,12 @@
import gregtech.api.pattern.PatternMatchContext;
import gregtech.api.pattern.TraceabilityPredicate;
import gregtech.api.recipes.Recipe;
import gregtech.api.unification.material.Material;
import gregtech.api.unification.material.Materials;
import gregtech.api.util.GTUtility;
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.Textures;
import gregtech.common.blocks.BlockMetalCasing;
import gregtech.common.blocks.BlockMultiblockCasing;
import gregtech.common.blocks.BlockTurbineCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.common.blocks.*;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
Expand All @@ -50,27 +50,32 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity iGregTechTileEnti
return new MetaTileEntityIndustrialDrill(metaTileEntityId);
}

// Dimensions: 9 x (16 + 1) x 9
@Override
protected BlockPattern createStructurePattern() {
return FactoryBlockPattern.start()
.aisle(" ", "XXXXXXX", "X X", "X X", "X X", "X X", "X X", "XXXXXXX")
.aisle(" ", "X X", " ", " F F ", " ", " ", " ", "X F X")
.aisle(" ", "X X", " C ", " FCF ", " C ", " CVC ", " CVC ", "X BBB X")
.aisle(" R ", "X D X", " CGC ", " CGC ", " CGC ", " VGV ", " VGV ", "XFBBBFX")
.aisle(" ", "X X", " C ", " FCF ", " C ", " CSC ", " CVC ", "X BBB X")
.aisle(" ", "X X", " ", " F F ", " ", " ", " ", "X F X")
.aisle(" ", "XXXXXXX", "X X", "X X", "X X", "X X", "X X", "XXXXXXX")
.aisle(" ", " F F ", " F F ", " F F ", " F F ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ")
.aisle(" ", " GGGGG ", " GGGGG ", " GGGGG ", " F F ", " F F ", " F F ", " ", " ", " ", " ", " ", " AAA ", " AAA ", " ", " ", " ")
.aisle(" ", " G G ", " G G ", " G G ", " ", " ", " F F ", " F F ", " ", " ", " RXR ", " RXR ", " ADDDA ", " ADDDA ", " RXR ", " RXR ", " ")
.aisle(" ", "FG GF", "FG I I GF", "FG III GF", "FF FIF FF", " F FXF F ", " FFFXFFF ", " FFXFF ", " FXF ", " FXF ", " RXXXR ", " RDDDR ", " AEEDEEA ", " AEEDEEA ", " RDDDR ", " RDDDR ", " AAA ")
.aisle(" Z ", " G H G ", " G E G ", " G IDI G ", " IDI ", " XDX ", " XDX ", " XDX ", " XDX ", " XDX ", " XXDXX ", " XDDDX ", " ADDDDDA ", " ADDDDDA ", " XDDDX ", " XDDDX ", " AAA ")
.aisle(" ", "FG GF", "FG I I GF", "FG III GF", "FF FIF FF", " F FXF F ", " FFFXFFF ", " FFXFF ", " FXF ", " FXF ", " RXXXR ", " RDDDR ", " AEEDEEA ", " AEEDEEA ", " RDDDR ", " RDDDR ", " AAA ")
.aisle(" ", " G G ", " G G ", " G G ", " ", " ", " F F ", " F F ", " ", " ", " RSR ", " RXR ", " ADDDA ", " ADDDA ", " RXR ", " RXR ", " ")
.aisle(" ", " GGGGG ", " GGGGG ", " GGGGG ", " F F ", " F F ", " F F ", " ", " ", " ", " ", " ", " AAA ", " AAA ", " ", " ", " ")
.aisle(" ", " F F ", " F F ", " F F ", " F F ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ")
.where('S', selfPredicate())
.where('X', states(GCYMMetaBlocks.LARGE_MULTIBLOCK_CASING.getState(BlockLargeMultiblockCasing.CasingType.ATOMIC_CASING)))
.where('F', states(MetaBlocks.FRAMES.get(GCYMMaterials.HSLASteel).getBlock(GCYMMaterials.HSLASteel)))
.where('C', states(MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID)))
.where('G', states(MetaBlocks.TURBINE_CASING.getState(BlockTurbineCasing.TurbineCasingType.TUNGSTENSTEEL_GEARBOX)))
.where('V', states(MetaBlocks.MULTIBLOCK_CASING.getState(BlockMultiblockCasing.MultiblockCasingType.GRATE_CASING)))
.where('B', states(MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID))
.setMinGlobalLimited(4)
.or(autoAbilities(true, true, false, true, true, true, true)))
.where('D', states(GCYSMetaBlocks.MULTIBLOCK_CASING.getState(BlockGCYSMultiblockCasing.CasingType.DRILL_HEAD)))
.where('R', bedrockPredicate())
.where('X', states(MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.TUNGSTENSTEEL_ROBUST))
.setMinGlobalLimited(30)
.or(autoAbilities(true, true, false, true, true, true, true)))
.where('F', states(MetaBlocks.FRAMES.get(Materials.Darmstadtium).getBlock(Materials.Darmstadtium)))
.where('I', states(GCYMMetaBlocks.LARGE_MULTIBLOCK_CASING.getState(BlockLargeMultiblockCasing.CasingType.VIBRATION_SAFE_CASING)))
.where('G', states(GCYSMetaBlocks.TRANSPARENT_CASING.getState(BlockTransparentCasing.CasingType.PMMA)))
.where('R', states(MetaBlocks.MULTIBLOCK_CASING.getState(BlockMultiblockCasing.MultiblockCasingType.GRATE_CASING)))
.where('A', states(MetaBlocks.BOILER_CASING.getState(BlockBoilerCasing.BoilerCasingType.TUNGSTENSTEEL_PIPE)))
.where('E', states(MetaBlocks.TURBINE_CASING.getState(BlockTurbineCasing.TurbineCasingType.TUNGSTENSTEEL_GEARBOX)))
.where('D', states(MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID))) // TODO Laser Focus Casing
.where('H', states(GCYSMetaBlocks.MULTIBLOCK_CASING.getState(BlockGCYSMultiblockCasing.CasingType.DRILL_HEAD)))
.where('Z', bedrockPredicate())
.where(' ', any())
.build();
}
Expand All @@ -88,7 +93,7 @@ protected TraceabilityPredicate bedrockPredicate() {

@Override
public ICubeRenderer getBaseTexture(IMultiblockPart iMultiblockPart) {
return Textures.SOLID_STEEL_CASING;
return Textures.ROBUST_TUNGSTENSTEEL_CASING;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package gregicality.science.common.metatileentities.multiblock;

import gregicality.multiblocks.api.render.GCYMTextures;
import gregicality.multiblocks.common.block.GCYMMetaBlocks;
import gregicality.multiblocks.common.block.blocks.BlockLargeMultiblockCasing;
import gregicality.multiblocks.common.block.blocks.BlockUniqueCasing;
import gregicality.science.api.metatileentity.multiblock.PressureMultiblockController;
import gregicality.science.api.recipes.GCYSRecipeMaps;
import gregicality.science.client.render.GCYSTextures;
import gregicality.science.common.block.GCYSMetaBlocks;
import gregicality.science.common.block.blocks.BlockGCYSMultiblockCasing;
import gregicality.science.common.block.blocks.BlockTransparentCasing;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.metatileentity.multiblock.IMultiblockPart;
import gregtech.api.pattern.BlockPattern;
import gregtech.api.pattern.FactoryBlockPattern;
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.cube.OrientedOverlayRenderer;
import gregtech.common.blocks.BlockGlassCasing;
import gregtech.common.blocks.MetaBlocks;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.ResourceLocation;

import javax.annotation.Nonnull;

public class MetaTileEntityPlasmaCVDUnit extends PressureMultiblockController {

public MetaTileEntityPlasmaCVDUnit(ResourceLocation metaTileEntityId) {
super(metaTileEntityId, GCYSRecipeMaps.PLASMA_CVD_RECIPES);
}

@Override
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity metaTileEntityHolder) {
return new MetaTileEntityPlasmaCVDUnit(metaTileEntityId);
}

@Override
protected BlockPattern createStructurePattern() {
return FactoryBlockPattern.start()
.aisle("XXXXXXX", " XGGGX ", " XGGGX ", " ")
.aisle("XXXXXXX", "XAAAAAX", "X X", " XGGGX ")
.aisle("VXXXXXV", "VAAAAAV", "X X", " XGGGX ")
.aisle("XXXXXXX", "XAAAAAX", "X X", " XGGGX ")
.aisle("XXXXXXX", " SGGGX ", " XGGGX ", " ")
.where('S', selfPredicate())
.where('X', states(getCasingState()).setMinGlobalLimited(40).or(autoAbilities()))
.where('G', states(getGlassState()))
.where('A', states(getSubstrateState()))
.where('V', states(GCYMMetaBlocks.UNIQUE_CASING.getState(BlockUniqueCasing.UniqueCasingType.HEAT_VENT)))
.where(' ', any())
.build();
}

private static IBlockState getCasingState() {
return GCYMMetaBlocks.LARGE_MULTIBLOCK_CASING.getState(BlockLargeMultiblockCasing.CasingType.ATOMIC_CASING);
}

private static IBlockState getSubstrateState() {
return GCYSMetaBlocks.MULTIBLOCK_CASING.getState(BlockGCYSMultiblockCasing.CasingType.ADVANCED_SUBSTRATE);
}

private static IBlockState getGlassState() {
return MetaBlocks.TRANSPARENT_CASING.getState(BlockGlassCasing.CasingType.FUSION_GLASS);
}

@Nonnull
@Override
protected OrientedOverlayRenderer getFrontOverlay() {
return GCYSTextures.CVD_UNIT_OVERLAY;
}

@Override
public ICubeRenderer getBaseTexture(IMultiblockPart iMultiblockPart) {
return GCYMTextures.ATOMIC_CASING;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.Textures;
import gregtech.common.ConfigHolder;
import gregtech.common.blocks.BlockFireboxCasing;
import gregtech.common.blocks.BlockGlassCasing;
import gregtech.common.blocks.BlockMetalCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.common.blocks.*;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -147,6 +144,27 @@ protected void resetTileAbilities() {

@Override
protected BlockPattern createStructurePattern() {
if (tier == GTValues.LuV) {
return FactoryBlockPattern.start()
.aisle(" F ", " F ", " XXX ", " XPX ", " XXX ", " F ", " F ")
.aisle(" ", " ", " XXX ", " XAX ", " XXX ", " ", " ").setRepeatable(2)
.aisle(" ", " X ", " XTX ", "GTATX", " XTX ", " G ", " ")
.aisle(" ", " X ", "XTATX", "GAAAG", "XTATX", " XGX ", " ").setRepeatable(3)
.aisle("F F", "FXXXF", "XBTBX", "XTSTX", "XBTBX", "FXXXF", "F F")
.where('S', selfPredicate())
.where('F', states(getFrameState()))
.where('X', states(getCasingState()).setMinGlobalLimited(50)
.or(autoAbilities())
.or(abilities(MultiblockAbility.IMPORT_FLUIDS).setExactLimit(1))
.or(abilities(MultiblockAbility.INPUT_ENERGY).setMinGlobalLimited(1).setMaxGlobalLimited(3)))
.where('G', states(getGlassState()))
.where('B', states(MetaBlocks.MULTIBLOCK_CASING.getState(BlockMultiblockCasing.MultiblockCasingType.EXTREME_ENGINE_INTAKE_CASING)))
.where('T', states(MetaBlocks.BOILER_CASING.getState(BlockBoilerCasing.BoilerCasingType.TUNGSTENSTEEL_PIPE)))
.where('A', airfoilPredicate())
.where('P', abilities(GCYSMultiblockAbility.PRESSURE_CONTAINER))
.build();
}

return FactoryBlockPattern.start()
.aisle("FXF", "XPX", "XXX")
.aisle("XXX", "GAG", "XXX").setRepeatable(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.Textures;
import gregtech.common.ConfigHolder;
import gregtech.common.blocks.BlockFireboxCasing;
import gregtech.common.blocks.BlockGlassCasing;
import gregtech.common.blocks.BlockMetalCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.common.blocks.*;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -148,6 +145,27 @@ protected void resetTileAbilities() {

@Override
protected BlockPattern createStructurePattern() {
if (tier == GTValues.LuV) {
return FactoryBlockPattern.start()
.aisle(" ", " ", " ", " ", " XGX ", " XGX ", " XGX ", " XXX ")
.aisle(" F F ", " F F ", " FXF ", " FPF ", "XAAAX", "XPAPX", "XPAPX", "XBPBX")
.aisle(" ", " Z ", " XAX ", " PAP ", "GAAAG", "GAAAG", "GAAAG", "XPSPX")
.aisle(" F F ", " F F ", " FXF ", " FPF ", "XAAAX", "XPAPX", "XPAPX", "XBPBX")
.aisle(" ", " ", " ", " ", " XGX ", " XGX ", " XGX ", " XXX ")
.where('S', selfPredicate())
.where('F', states(getFrameState()))
.where('X', states(getCasingState()).setMinGlobalLimited(32)
.or(autoAbilities())
.or(abilities(MultiblockAbility.IMPORT_FLUIDS).setExactLimit(1))
.or(abilities(MultiblockAbility.INPUT_ENERGY).setMinGlobalLimited(1).setMaxGlobalLimited(3)))
.where('G', states(getGlassState()))
.where('A', airfoilPredicate())
.where('P', states(MetaBlocks.BOILER_CASING.getState(BlockBoilerCasing.BoilerCasingType.TUNGSTENSTEEL_PIPE)))
.where('B', states(MetaBlocks.MULTIBLOCK_CASING.getState(BlockMultiblockCasing.MultiblockCasingType.EXTREME_ENGINE_INTAKE_CASING)))
.where('Z', states(getCasingState())
.or(abilities(GCYSMultiblockAbility.PRESSURE_CONTAINER).setExactLimit(1)))
.build();
}
return FactoryBlockPattern.start(RelativeDirection.RIGHT, RelativeDirection.FRONT, RelativeDirection.DOWN)
.aisle("XXX", "XSX", "XXX")
.aisle("XGX", "GAG", "XGX").setRepeatable(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ private static void multiblocks() {
'E', EMITTER_EV.getStackForm()
);

ModHandler.addShapedRecipe(true, "plasma_cvd_unit", PLASMA_CVD_UNIT.getStackForm(),
"PKP", "CHC", "ESE",
'P', new UnificationEntry(plate, Adamantium),
'K', new UnificationEntry(cableGtSingle, SiliconCarbide),
'C', new UnificationEntry(circuit, MarkerMaterials.Tier.UV),
'H', MetaTileEntities.HULL[UV].getStackForm(),
'S', SENSOR_UV.getStackForm(),
'E', EMITTER_UV.getStackForm()
);

ModHandler.addShapedRecipe(true, "burner_reactor", BURNER_REACTOR.getStackForm(),
"KRK", "IHI", "CMC",
'K', new UnificationEntry(cableGtSingle, Platinum),
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/gcys/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ gcys.multiblock.turbomolecular_pump.tooltip.1=Decreases pressure by §b%sPa/s§7
gcys.multiblock.turbomolecular_pump.tooltip.2=Consumes §e%sL/s§7 Lubricant when decreasing pressure.
gcys.multiblock.turbomolecular_pump.tooltip.3=Uses %s§7 power. Does not overclock.

# Plasma CVD Unit
gcys.machine.plasma_cvd_unit.name=Plasma CVD Unit

# Single Block Machines

gcys.machine.dryer.lv.name=Basic Dryer
Expand Down