Skip to content
Merged
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
@@ -1,5 +1,7 @@
package com.github.gtexpert.core.common.metatileentities.multi;

import static gregtech.api.recipes.logic.OverclockingLogic.*;

import java.util.List;

import net.minecraft.block.state.IBlockState;
Expand All @@ -18,17 +20,21 @@
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.TraceabilityPredicate;
import gregtech.api.recipes.RecipeMaps;
import gregtech.api.recipes.recipeproperties.IRecipePropertyStorage;
import gregtech.client.renderer.ICubeRenderer;
import gregtech.client.renderer.texture.Textures;
import gregtech.client.utils.TooltipHelper;
import gregtech.common.blocks.BlockBoilerCasing;
import gregtech.common.blocks.BlockMetalCasing;
import gregtech.common.blocks.MetaBlocks;
import gregtech.core.sound.GTSoundEvents;

import gregicality.multiblocks.api.capability.impl.GCYMMultiblockRecipeLogic;
import gregicality.multiblocks.api.metatileentity.GCYMRecipeMapMultiblockController;

import com.github.gtexpert.core.api.gui.GTEGuiTextures;
Expand All @@ -37,6 +43,7 @@ public class MetaTileEntityAdvancedChemicalPlant extends GCYMRecipeMapMultiblock

public MetaTileEntityAdvancedChemicalPlant(ResourceLocation metaTileEntityId) {
super(metaTileEntityId, RecipeMaps.LARGE_CHEMICAL_RECIPES);
this.recipeMapWorkable = new AdvancedChemicalPlantWorkableHandler(this);
}

@Override
Expand Down Expand Up @@ -64,16 +71,6 @@ protected BlockPattern createStructurePattern() {
.build();
}

@Override
public boolean allowsExtendedFacing() {
return false;
}

@Override
public boolean allowsFlip() {
return false;
}

@Override
public boolean isTiered() {
return true;
Expand Down Expand Up @@ -112,6 +109,7 @@ public SoundEvent getBreakdownSound() {
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.advanced_chemical_plant.tooltip.1"));
tooltip.add(TooltipHelper.RAINBOW_SLOW + I18n.format("gregtech.machine.perfect_oc"));
}

@Override
Expand All @@ -135,4 +133,31 @@ public void addInformation(ItemStack stack, @Nullable World player, List<String>
protected ICubeRenderer getFrontOverlay() {
return Textures.CHEMICAL_REACTOR_OVERLAY;
}

@SuppressWarnings("InnerClassMayBeStatic")
private class AdvancedChemicalPlantWorkableHandler extends GCYMMultiblockRecipeLogic {

public AdvancedChemicalPlantWorkableHandler(RecipeMapMultiblockController tileEntity) {
super(tileEntity);
}

protected int[] runOverclockingLogic(@NotNull IRecipePropertyStorage propertyStorage, int recipeEUt,
long maxVoltage, int duration, int amountOC) {
return standardOverclockingLogic(
Math.abs(recipeEUt),
maxVoltage,
duration,
amountOC,
getOverclockingDurationDivisor(),
getOverclockingVoltageMultiplier());
}

protected double getOverclockingDurationDivisor() {
return PERFECT_OVERCLOCK_DURATION_DIVISOR;
}

protected double getOverclockingVoltageMultiplier() {
return STANDARD_OVERCLOCK_VOLTAGE_MULTIPLIER;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ protected BlockPattern createStructurePattern() {
}
}

@Override
public boolean allowsExtendedFacing() {
return false;
}

@Override
public boolean allowsFlip() {
return false;
}

@Override
public boolean isTiered() {
return true;
Expand Down
Loading