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

Commit

Permalink
fix neturon accelrerator broken in thermals
Browse files Browse the repository at this point in the history
  • Loading branch information
GlodBlock committed Jun 14, 2022
1 parent 0030553 commit 13b8e48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import net.minecraft.nbt.NBTTagCompound;

import static gregtech.api.enums.GT_Values.V;

Expand All @@ -22,16 +21,6 @@ public int getMaxEUConsume() {
return (int)(V[mTier] * 8 / 10);
}

@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
}

@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
}

@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new NeutronAccelerator(mName, mTier, this.getDescription(), mTextures);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.XSTR;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
Expand All @@ -33,7 +34,6 @@
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.input.Keyboard;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -42,7 +42,6 @@
import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO;
import static goodgenerator.util.StructureHelper.addFrame;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static org.apache.commons.lang3.RandomUtils.nextInt;

public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable {

Expand All @@ -52,6 +51,7 @@ public class NeutronActivator extends GT_MetaTileEntity_TooltipMultiBlockBase_EM
protected int casingAmount = 0;
protected int height = 0;
protected int eV = 0, mCeil = 0, mFloor = 0;
final XSTR R = new XSTR();

private static final IIconContainer textureFontOn = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_On");
private static final IIconContainer textureFontOn_Glow = new Textures.BlockIcons.CustomIcon("icons/NeutronActivator_On_GLOW");
Expand Down Expand Up @@ -343,7 +343,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
for (NeutronAccelerator tHatch : mNeutronAccelerator) {
if (tHatch.getBaseMetaTileEntity().isActive() && this.getRepairStatus() == this.getIdealStatus()) {
anyWorking = true;
this.eV += Math.max(nextInt(tHatch.getMaxEUConsume(), tHatch.getMaxEUConsume() * 2 + 1) * 10 * Math.pow(0.95, height - 4), 10);
this.eV += Math.max((R.nextInt(tHatch.getMaxEUConsume() + 1) + tHatch.getMaxEUConsume()) * 10 * Math.pow(0.95, height - 4), 10);
}
}
if (!anyWorking) {
Expand Down Expand Up @@ -414,7 +414,7 @@ public String[] getInfoData() {
boolean anyWorking = false;
for (NeutronAccelerator tHatch : mNeutronAccelerator) {
if (tHatch.getBaseMetaTileEntity().isActive()) {
currentNKEInput += nextInt(tHatch.getMaxEUConsume(), tHatch.getMaxEUConsume() * 2 + 1) * 10 * Math.pow(0.95, height - 4);
currentNKEInput += (R.nextInt(tHatch.getMaxEUConsume() + 1) + tHatch.getMaxEUConsume()) * 10 * Math.pow(0.95, height - 4);
anyWorking = true;
}
}
Expand Down

0 comments on commit 13b8e48

Please sign in to comment.