-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the Volcanus and Cryogenic Freezer from GT:NH (#112)
* HELL * Bolt had weird transparency * My MTEs are registered before Thermal registers its fluids........... * Should work without thermal too!! * Snow!!!! * Snow powder!!! * spotlleslls
- Loading branch information
Showing
144 changed files
with
1,049 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/com/zorbatron/zbgt/api/metatileentity/ZBGTMultiblockAbilities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.zorbatron.zbgt.api.metatileentity; | ||
|
||
import net.minecraftforge.fluids.IFluidTank; | ||
|
||
import gregtech.api.metatileentity.multiblock.MultiblockAbility; | ||
|
||
@SuppressWarnings("InstantiationOfUtilityClass") | ||
public class ZBGTMultiblockAbilities { | ||
|
||
public static final MultiblockAbility<IFluidTank> PYROTHEUM_HATCH = new MultiblockAbility<>("pyrotheum_hatch"); | ||
public static final MultiblockAbility<IFluidTank> CRYOTHEUM_HATCH = new MultiblockAbility<>("cryotheum_hatch"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/main/java/com/zorbatron/zbgt/api/unification/material/info/ZBGTMaterialIconSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.zorbatron.zbgt.api.unification.material.info; | ||
|
||
import gregtech.api.unification.material.info.MaterialIconSet; | ||
|
||
public class ZBGTMaterialIconSet { | ||
|
||
public static final MaterialIconSet FIERY = new MaterialIconSet("fiery"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
...zorbatron/zbgt/common/metatileentities/multi/electric/MetaTileEntityCryogenicFreezer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package com.zorbatron.zbgt.common.metatileentities.multi.electric; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.fluids.IFluidTank; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.zorbatron.zbgt.api.metatileentity.ZBGTMultiblockAbilities; | ||
import com.zorbatron.zbgt.api.render.ZBGTTextures; | ||
import com.zorbatron.zbgt.common.block.ZBGTMetaBlocks; | ||
import com.zorbatron.zbgt.common.block.blocks.MiscCasing; | ||
|
||
import gregtech.api.capability.impl.MultiblockRecipeLogic; | ||
import gregtech.api.metatileentity.MetaTileEntity; | ||
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; | ||
import gregtech.api.metatileentity.multiblock.IMultiblockPart; | ||
import gregtech.api.metatileentity.multiblock.RecipeMapMultiblockController; | ||
import gregtech.api.pattern.BlockPattern; | ||
import gregtech.api.pattern.FactoryBlockPattern; | ||
import gregtech.api.pattern.PatternMatchContext; | ||
import gregtech.api.recipes.Recipe; | ||
import gregtech.api.recipes.RecipeMaps; | ||
import gregtech.client.renderer.ICubeRenderer; | ||
|
||
public class MetaTileEntityCryogenicFreezer extends RecipeMapMultiblockController { | ||
|
||
private final int CRYOTHEUM_DRAIN_AMOUNT = 10; | ||
|
||
private IFluidTank cryotheumTank; | ||
|
||
public MetaTileEntityCryogenicFreezer(ResourceLocation metaTileEntityId) { | ||
super(metaTileEntityId, RecipeMaps.VACUUM_RECIPES); | ||
recipeMapWorkable = new MultiblockRecipeLogic(this) { | ||
|
||
@Override | ||
protected boolean shouldSearchForRecipes() { | ||
return hasCryotheum() && super.shouldSearchForRecipes(); | ||
} | ||
|
||
@Override | ||
protected boolean canProgressRecipe() { | ||
return hasCryotheum() && super.canProgressRecipe(); | ||
} | ||
}; | ||
recipeMapWorkable.setSpeedBonus(0.5); | ||
recipeMapWorkable.setParallelLimit(4); | ||
} | ||
|
||
@Override | ||
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) { | ||
return new MetaTileEntityCryogenicFreezer(metaTileEntityId); | ||
} | ||
|
||
@Override | ||
protected void updateFormedValid() { | ||
super.updateFormedValid(); | ||
|
||
if (isActive() && getOffsetTimer() % 20 == 0) { | ||
cryotheumTank.drain(CRYOTHEUM_DRAIN_AMOUNT, true); | ||
} | ||
} | ||
|
||
@Override | ||
protected void formStructure(PatternMatchContext context) { | ||
super.formStructure(context); | ||
|
||
cryotheumTank = getAbilities(ZBGTMultiblockAbilities.CRYOTHEUM_HATCH).get(0); | ||
} | ||
|
||
@Override | ||
public boolean checkRecipe(@NotNull Recipe recipe, boolean consumeIfSuccess) { | ||
return cryotheumTank.getFluidAmount() != 0; | ||
} | ||
|
||
@Override | ||
protected @NotNull BlockPattern createStructurePattern() { | ||
return FactoryBlockPattern.start() | ||
.aisle("XXX", "XXX", "XXX") | ||
.aisle("XXX", "X#X", "XXX") | ||
.aisle("XXX", "XSX", "XXX") | ||
.where('S', selfPredicate()) | ||
.where('X', states(getCasing()).setMinGlobalLimited(10) | ||
.or(autoAbilities(true, true, true, true, true, true, false)) | ||
.or(abilities(ZBGTMultiblockAbilities.CRYOTHEUM_HATCH).setExactLimit(1))) | ||
.where('#', air()) | ||
.build(); | ||
} | ||
|
||
protected IBlockState getCasing() { | ||
return ZBGTMetaBlocks.MISC_CASING.getState(MiscCasing.CasingType.CRYOGENIC_CASING); | ||
} | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Override | ||
public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) { | ||
return ZBGTTextures.CRYOGENIC_CASING; | ||
} | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Override | ||
protected @NotNull ICubeRenderer getFrontOverlay() { | ||
return ZBGTTextures.GTPP_MACHINE_OVERLAY; | ||
} | ||
|
||
private boolean hasCryotheum() { | ||
return cryotheumTank.getFluidAmount() > CRYOTHEUM_DRAIN_AMOUNT; | ||
} | ||
} |
Oops, something went wrong.