Skip to content

Commit

Permalink
Remove usages of deprecated apis (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Dec 23, 2024
1 parent fa47327 commit 0c7d65c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import org.jetbrains.annotations.NotNull;

import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
Expand Down Expand Up @@ -40,6 +42,8 @@
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.MTEHatchOutput;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.util.GTUtility;
import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase;
import tectech.thing.metaTileEntity.multi.base.render.TTRenderedExtendedFacingTexture;
Expand Down Expand Up @@ -116,9 +120,9 @@ public IStructureDefinition<HEHydroDamTileEntity> getStructure_EM() {
}

@Override
public boolean checkRecipe_EM(ItemStack stack) {
protected @NotNull CheckRecipeResult checkProcessing_EM() {
mMaxProgresstime = 1;
return true;
return CheckRecipeResultRegistry.SUCCESSFUL;
}

private float getMaxGuiPressure() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
import tectech.thing.metaTileEntity.multi.base.render.TTRenderedExtendedFacingTexture;

public abstract class HEHydroPumpTileEntity extends HETieredTileEntity {
Expand Down Expand Up @@ -370,7 +371,7 @@ public void onTick() {
}
}
if (requiredWater > 0) {
stopMachine();
stopMachine(ShutDownReasonRegistry.NONE);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;

import org.jetbrains.annotations.NotNull;

import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
Expand All @@ -15,6 +17,8 @@
import gregtech.api.GregTechAPI;
import gregtech.api.enums.GTValues;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.util.GTLanguageManager;
import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase;

Expand Down Expand Up @@ -143,11 +147,11 @@ public boolean onRunningTick(ItemStack stack) {
protected abstract long getEnergyConsumption();

@Override
public boolean checkRecipe_EM(ItemStack stack) {
protected @NotNull CheckRecipeResult checkProcessing_EM() {
mMaxProgresstime = 1;
mEUt = (int) getEnergyConsumption();
mEfficiencyIncrease = 100_00;
return true;
return CheckRecipeResultRegistry.SUCCESSFUL;
}

@Override
Expand Down

0 comments on commit 0c7d65c

Please sign in to comment.