fixed RTG pellets using old values

This commit is contained in:
Boblet 2021-12-20 16:39:43 +01:00
parent 87b95f4702
commit 5ff7bf2dec
2 changed files with 14 additions and 12 deletions

View File

@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.PacketDispatcher;
@ -215,22 +216,14 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
heat = 0;
for(int i = 0; i < slots.length; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.pellet_rtg)
heat += 5;
if(slots[i].getItem() == ModItems.pellet_rtg_weak)
heat += 3;
if(slots[i].getItem() == ModItems.pellet_rtg_polonium)
heat += 25;
if(slots[i].getItem() == ModItems.pellet_rtg_americium)
heat += 50;
if(slots[i] != null && slots[i].getItem() instanceof ItemRTGPellet) {
heat += ((ItemRTGPellet)slots[i].getItem()).getHeat();
if(slots[i].getItem() == ModItems.pellet_rtg_gold) {
if(worldObj.rand.nextInt(60*60*20) == 0)
slots[i] = null;
else
heat += 150;
}
}
}

View File

@ -47,6 +47,15 @@ import net.minecraftforge.common.util.ForgeDirection;
*/
public abstract class TileEntityRBMKBase extends TileEntity implements INBTPacketReceiver {
/*
*
*
*
*
*
*
*/
public double heat;
public int water;