attempts to merge

This commit is contained in:
Vaern 2021-12-29 22:46:40 -08:00
parent e0433a3174
commit 9be7a1f378
2 changed files with 15 additions and 27 deletions

View File

@ -21,7 +21,7 @@ public class GasCentrifugeRecipes {
MEUF6 (200, 100, "HEUF6", "Medium Enriched UF6", false, new ItemStack(ModItems.nugget_u238, 1)),
HEUF6 (300, 0, "NONE", "High Enriched UF6", true, new ItemStack(ModItems.nugget_u238, 2), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 1)),
PF6 (300, 0, "NONE", "Plutonium Hexafluoride", true, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1));
PF6 (300, 0, "NONE", "Plutonium Hexafluoride", false, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1));
int fluidConsumed;
int fluidProduced;

View File

@ -1,29 +1,22 @@
package com.hbm.tileentity.machine;
import com.hbm.inventory.recipes.CentrifugeRecipes;
import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.LoopedSoundPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.energy.IBatteryItem;
import api.hbm.energy.IEnergyUser;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements ISidedInventory, IEnergyUser {
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyUser {
public int progress;
public long power;
@ -31,9 +24,12 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
public static final int maxPower = 100000;
public static final int processingSpeed = 200;
private static final int[] slots_top = new int[] { 0 };
private static final int[] slots_bottom = new int[] { 2, 3, 4, 5 };
private static final int[] slots_side = new int[] { 0, 1 };
/*
* So why do we do this now? You have a funny mekanism/thermal/whatever pipe and you want to output stuff from a side
* that isn't the bottom, what do? Answer: make all slots accessible from all sides and regulate in/output in the
* dedicated methods. Duh.
*/
private static final int[] slot_io = new int[] { 0, 2, 3, 4, 5 };
public TileEntityMachineCentrifuge() {
super(6);
@ -43,22 +39,14 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
return "container.centrifuge";
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return side == 0 ? slots_bottom : (side == 1 ? slots_top : slots_side);
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(i == 2 || i == 3 || i == 4 || i == 5) {
return false;
}
return i == 0;
}
if(i == 1) {
return itemStack.getItem() instanceof IBatteryItem;
}
return !(itemStack.getItem() instanceof IBatteryItem);
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return slot_io;
}
@Override
@ -77,7 +65,7 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return j != 0 || i != 1;
return i > 1;
}
public int getCentrifugeProgressScaled(int i) {
@ -223,4 +211,4 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
public long getMaxPower() {
return maxPower;
}
}
}