generated from CleanroomMC/TemplateDevEnv
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
170 additions
and
18 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
141 changes: 141 additions & 0 deletions
141
...om/github/gtexpert/core/common/metatileentities/multi/MetaTileEntityLargeRockBreaker.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,141 @@ | ||
package com.github.gtexpert.core.common.metatileentities.multi; | ||
|
||
import java.util.List; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.client.resources.I18n; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.util.SoundEvent; | ||
import net.minecraft.world.World; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import gregtech.api.gui.resources.TextureArea; | ||
import gregtech.api.metatileentity.MetaTileEntity; | ||
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; | ||
import gregtech.api.metatileentity.multiblock.IMultiblockPart; | ||
import gregtech.api.metatileentity.multiblock.MultiblockAbility; | ||
import gregtech.api.pattern.BlockPattern; | ||
import gregtech.api.pattern.FactoryBlockPattern; | ||
import gregtech.api.pattern.TraceabilityPredicate; | ||
import gregtech.api.recipes.RecipeMaps; | ||
import gregtech.client.renderer.ICubeRenderer; | ||
import gregtech.client.renderer.texture.Textures; | ||
import gregtech.common.blocks.BlockBoilerCasing; | ||
import gregtech.common.blocks.BlockMetalCasing; | ||
import gregtech.common.blocks.MetaBlocks; | ||
import gregtech.core.sound.GTSoundEvents; | ||
|
||
import gregicality.multiblocks.api.metatileentity.GCYMRecipeMapMultiblockController; | ||
|
||
import com.github.gtexpert.core.api.gui.GTEGuiTextures; | ||
|
||
public class MetaTileEntityLargeRockBreaker extends GCYMRecipeMapMultiblockController { | ||
|
||
public MetaTileEntityLargeRockBreaker(ResourceLocation metaTileEntityId) { | ||
super(metaTileEntityId, RecipeMaps.ROCK_BREAKER_RECIPES); | ||
} | ||
|
||
@Override | ||
public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) { | ||
return new MetaTileEntityLargeRockBreaker(metaTileEntityId); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
protected BlockPattern createStructurePattern() { | ||
TraceabilityPredicate casing = states(getCasingState()); | ||
TraceabilityPredicate abilities = autoAbilities(true, true, true, true, false, false, false); | ||
return FactoryBlockPattern.start() | ||
.aisle("CXXXC", "CXXXC", "C C", "C C", "C C", "CCCCC", " C ", " ") | ||
.aisle("XCCCX", "X X", " ", " P ", " P ", "CPPPC", " CPC ", " C ") | ||
.aisle("XCCCX", "X X", " C ", " PCP ", " PCP ", "CPCPC", "CP#PC", " CHC ") | ||
.aisle("XCCCX", "X X", " ", " P ", " P ", "CPPPC", " CPC ", " C ") | ||
.aisle("CXTXC", "CXSXC", "C C", "C C", "C C", "CCCCC", " C ", " ") | ||
.where('S', selfPredicate()) | ||
.where('C', casing) | ||
.where('X', casing.or(abilities)) | ||
.where('P', states(getPipeCasingState())) | ||
.where('T', tieredCasing().or(states(getCasingState()))) | ||
.where('H', abilities(MultiblockAbility.MUFFLER_HATCH)) | ||
.where('#', air()) | ||
.where(' ', any()) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public boolean allowsExtendedFacing() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean allowsFlip() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isTiered() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean canBeDistinct() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean isParallel() { | ||
return true; | ||
} | ||
|
||
@SideOnly(Side.CLIENT) | ||
@Override | ||
public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) { | ||
return Textures.SOLID_STEEL_CASING; | ||
} | ||
|
||
protected IBlockState getPipeCasingState() { | ||
return MetaBlocks.BOILER_CASING.getState(BlockBoilerCasing.BoilerCasingType.STEEL_PIPE); | ||
} | ||
|
||
protected IBlockState getCasingState() { | ||
return MetaBlocks.METAL_CASING.getState(BlockMetalCasing.MetalCasingType.STEEL_SOLID); | ||
} | ||
|
||
@Override | ||
public SoundEvent getBreakdownSound() { | ||
return GTSoundEvents.BREAKDOWN_ELECTRICAL; | ||
} | ||
|
||
@Override | ||
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) { | ||
super.addInformation(stack, player, tooltip, advanced); | ||
tooltip.add(I18n.format("gtexpert.machine.large_rock_breaker.tooltip.1")); | ||
} | ||
|
||
@Override | ||
protected @NotNull TextureArea getLogo() { | ||
return GTEGuiTextures.GTE_LOGO_DARK; | ||
} | ||
|
||
@Override | ||
protected @NotNull TextureArea getWarningLogo() { | ||
return GTEGuiTextures.GTE_LOGO_BLINKING_YELLOW; | ||
} | ||
|
||
@Override | ||
protected @NotNull TextureArea getErrorLogo() { | ||
return GTEGuiTextures.GTE_LOGO_BLINKING_RED; | ||
} | ||
|
||
@SideOnly(Side.CLIENT) | ||
@NotNull | ||
@Override | ||
protected ICubeRenderer getFrontOverlay() { | ||
return Textures.ROCK_BREAKER_OVERLAY; | ||
} | ||
} |
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