mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-22 05:50:49 +00:00
that should hopefully resolve some garbage
This commit is contained in:
parent
2aaa426feb
commit
8037893637
@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks;
|
|||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.entity.missile.*;
|
import com.hbm.entity.missile.*;
|
||||||
import com.hbm.interfaces.IBomb;
|
import com.hbm.interfaces.IBomb;
|
||||||
|
import com.hbm.interfaces.Spaghetti;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||||
@ -167,6 +168,7 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
|||||||
return Item.getItemFromBlock(ModBlocks.launch_pad);
|
return Item.getItemFromBlock(ModBlocks.launch_pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Spaghetti("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA *takes breath* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
|
||||||
@Override
|
@Override
|
||||||
public void explode(World world, int x, int y, int z) {
|
public void explode(World world, int x, int y, int z) {
|
||||||
|
|
||||||
@ -177,6 +179,9 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
|||||||
|
|
||||||
if(entity.slots[1] != null && entity.slots[1].getItem() instanceof IDesignatorItem && entity.power >= 75000) {
|
if(entity.slots[1] != null && entity.slots[1].getItem() instanceof IDesignatorItem && entity.power >= 75000) {
|
||||||
|
|
||||||
|
if(!((IDesignatorItem)entity.slots[1].getItem()).isReady(world, entity.slots[1], x, y, z))
|
||||||
|
return;
|
||||||
|
|
||||||
int xCoord = entity.slots[1].stackTagCompound.getInteger("xCoord");
|
int xCoord = entity.slots[1].stackTagCompound.getInteger("xCoord");
|
||||||
int zCoord = entity.slots[1].stackTagCompound.getInteger("zCoord");
|
int zCoord = entity.slots[1].stackTagCompound.getInteger("zCoord");
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public class GasCentrifugeRecipes {
|
|||||||
MEUF6 (200, 100, "HEUF6", "Medium Enriched UF6", false, new ItemStack(ModItems.nugget_u238, 1)),
|
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)),
|
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 fluidConsumed;
|
||||||
int fluidProduced;
|
int fluidProduced;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.hbm.tileentity;
|
package com.hbm.tileentity;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.interfaces.Spaghetti;
|
|
||||||
import com.hbm.packet.AuxGaugePacket;
|
import com.hbm.packet.AuxGaugePacket;
|
||||||
import com.hbm.packet.NBTPacket;
|
import com.hbm.packet.NBTPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|||||||
@ -1,31 +1,22 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import com.hbm.inventory.recipes.CentrifugeRecipes;
|
import com.hbm.inventory.recipes.CentrifugeRecipes;
|
||||||
import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType;
|
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
import com.hbm.packet.AuxGaugePacket;
|
|
||||||
import com.hbm.packet.LoopedSoundPacket;
|
import com.hbm.packet.LoopedSoundPacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
import api.hbm.energy.IBatteryItem;
|
|
||||||
import api.hbm.energy.IEnergyUser;
|
import api.hbm.energy.IEnergyUser;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
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.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
|
||||||
//TODO: move this trash to TileEntityMachineBase
|
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyUser {
|
||||||
//no seriously, this is dreadful
|
|
||||||
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements ISidedInventory, IEnergyUser {
|
|
||||||
|
|
||||||
public int progress;
|
public int progress;
|
||||||
public long power;
|
public long power;
|
||||||
@ -33,9 +24,12 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
|||||||
public static final int maxPower = 100000;
|
public static final int maxPower = 100000;
|
||||||
public static final int processingSpeed = 200;
|
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 };
|
* So why do we do this now? You have a funny mekanism/thermal/whatever pipe and you want to output stuff from a side
|
||||||
private static final int[] slots_side = new int[] { 0, 1 };
|
* 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() {
|
public TileEntityMachineCentrifuge() {
|
||||||
super(6);
|
super(6);
|
||||||
@ -45,18 +39,14 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
|||||||
return "container.centrifuge";
|
return "container.centrifuge";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||||
if(i == 2 || i == 3 || i == 4 || i == 5) {
|
return i == 0;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(i == 1) {
|
@Override
|
||||||
return itemStack.getItem() instanceof IBatteryItem;
|
public int[] getAccessibleSlotsFromSide(int side) {
|
||||||
}
|
return slot_io;
|
||||||
|
|
||||||
return !(itemStack.getItem() instanceof IBatteryItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -75,7 +65,7 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||||
return j != 0 || i != 1;
|
return i > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCentrifugeProgressScaled(int i) {
|
public int getCentrifugeProgressScaled(int i) {
|
||||||
|
|||||||
@ -1,22 +1,18 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.special.ItemWasteLong;
|
import com.hbm.items.special.ItemWasteLong;
|
||||||
import com.hbm.items.special.ItemWasteShort;
|
import com.hbm.items.special.ItemWasteShort;
|
||||||
import com.hbm.lib.Library;
|
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.util.Tuple.Triplet;
|
import com.hbm.util.Tuple.Triplet;
|
||||||
|
|
||||||
import api.hbm.energy.IEnergyGenerator;
|
import api.hbm.energy.IEnergyGenerator;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
@ -242,7 +238,9 @@ public class TileEntityMachineRadGen extends TileEntityMachineBase implements IE
|
|||||||
Triplet<Integer, Integer, ItemStack> result = grabResult(stack);
|
Triplet<Integer, Integer, ItemStack> result = grabResult(stack);
|
||||||
if(result == null)
|
if(result == null)
|
||||||
return null;
|
return null;
|
||||||
return result.getZ();
|
if(result.getZ() == null)
|
||||||
|
return null;
|
||||||
|
return result.getZ().copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user