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

Commit

Permalink
updated antimatter, fixed issue with thorium reactor draining all flu…
Browse files Browse the repository at this point in the history
…id at once
  • Loading branch information
Trinsdar committed Jul 31, 2024
1 parent f18a71e commit 469c9fb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion AntimatterAPI
Original file line number Diff line number Diff line change
Expand Up @@ -381,25 +381,28 @@ public void onServerTickPost(Level level, BlockPos pos, boolean aFirst) {
isExploding = true;
} else {
tEnergy = handler.getHeat() / heatPerCoolant;
int multiplier = hotCoolant == Steam ? 160 : 1;
int toFill = hotCoolant == Steam ? tEnergy * 160 : tEnergy;
FluidHolder fluidHolder = hotCoolant.has(AntimatterMaterialTypes.GAS) ? hotCoolant.getGas(toFill) : hotCoolant.getLiquid(toFill);
if (coldCoolant.getFluidAmount() >= tEnergy * TesseractGraphWrappers.dropletMultiplier && fluidHandler1.fillOutput(fluidHolder.copyHolder(), true) == toFill * TesseractGraphWrappers.dropletMultiplier){
fluidHandler1.fillOutput(fluidHolder, false);
handler.extractInternal(tEnergy * heatPerCoolant, false);
fluidHandler1.drainInput(tEnergy * TesseractGraphWrappers.dropletMultiplier, false);
} else if (tEnergy > 0) isExploding = true;
if (tEnergy > 0){
FluidHolder fluidHolder = hotCoolant.has(AntimatterMaterialTypes.GAS) ? hotCoolant.getGas(tEnergy * multiplier) : hotCoolant.getLiquid(tEnergy);
if (coldCoolant.getFluidAmount() >= tEnergy * TesseractGraphWrappers.dropletMultiplier && fluidHandler1.fillOutput(fluidHolder.copyHolder(), true) == tEnergy * multiplier * TesseractGraphWrappers.dropletMultiplier){
fluidHandler1.fillOutput(fluidHolder, false);
handler.extractInternal(tEnergy * heatPerCoolant, false);
fluidHandler1.drainInput(tEnergy * TesseractGraphWrappers.dropletMultiplier, false);
}
}
}
if (isExploding && !itemHandler.get().getHandler(SlotType.STORAGE).isEmpty()){
level.playSound(null, pos, SoundEvents.GENERIC_EXPLODE, SoundSource.BLOCKS, 1.0f, 1.0f);
tCalc *= 2;
/*tCalc *= 2;
setRod(0, ItemStack.EMPTY);
setRod(1, ItemStack.EMPTY);
setRod(2, ItemStack.EMPTY);
setRod(3, ItemStack.EMPTY);
for (LivingEntity tEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(pos.offset(-500, 0, -500).atY(level.getMinBuildHeight()), pos.offset(500, 0, 500).atY(level.getMaxBuildHeight())))){
int tStrength = CodeUtils.bindInt((long)(tCalc - tEntity.distanceToSqr(pos.getX(), pos.getY(), pos.getZ())));
if (tStrength > 0) Utils.applyRadioactivity(tEntity, (int)CodeUtils.divup(tStrength, 10), tStrength);
}
}*/
}

}
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/muramasa/gregtech/data/Guis.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static void slots(){
COMBUSTION_GENERATOR.add(BASIC_TANK.getSlots());
SEMIFLUID_GENERATOR.add(BASIC_TANK.getSlots());
NAQUADAH_GENERATOR.add(BASIC_TANK.getSlots());
NUCLEAR_REACTOR_CORE.add(STORAGE, 70, 25).add(STORAGE, 70, 43).add(STORAGE, 88, 25).add(STORAGE, 88, 43);
NUCLEAR_REACTOR_CORE.add(STORAGE, 70, 25).add(STORAGE, 70, 43).add(STORAGE, 88, 25).add(STORAGE, 88, 43).add(FL_IN, 70, 61).add(FL_OUT, 88, 61);
SMALL_HEAT_EXCHANGER.add(IT_IN, 53, 25).add(IT_OUT, 107, 25).add(FL_IN, 44, 63).add(FL_IN, 62, 63)
.add(FL_OUT,107,63).add(FL_OUT,125,63);

Expand Down

0 comments on commit 469c9fb

Please sign in to comment.