Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
fix moc crashing when being placed (#347)
Browse files Browse the repository at this point in the history
Former-commit-id: 83e664bd0a83101b403a4dfc8f16a6fdf5534ba2
  • Loading branch information
BlueWeabo authored Jul 25, 2023
1 parent c8df778 commit 833956b
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Nonnull;

import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
Expand All @@ -50,6 +52,7 @@
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
Expand Down Expand Up @@ -183,8 +186,14 @@ public GT_Recipe.GT_Recipe_Map getRecipeMap() {

@Override
protected ProcessingLogic createProcessingLogic() {
return new ProcessingLogic().setMaxParallel(ConfigHandler.megaMachinesMax)
.setEuModifier(1.0F - Math.min(0.1F * (heatLevel.getTier() + 1), 0.5F));
return new ProcessingLogic() {

@Nonnull
public CheckRecipeResult process() {
setEuModifier(1.0F - Math.min(0.1F * (heatLevel.getTier() + 1), 0.5F));
return super.process();
}
}.setMaxParallel(ConfigHandler.megaMachinesMax);
}

public HeatingCoilLevel getCoilLevel() {
Expand Down

0 comments on commit 833956b

Please sign in to comment.