Minor clean up
This commit is contained in:
parent
d0b0a34a31
commit
428b187722
67 changed files with 1047 additions and 1085 deletions
|
@ -7,40 +7,48 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
|||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import universalelectricity.api.net.INodeNetwork;
|
||||
|
||||
/** Interface version of the fluid network.
|
||||
/**
|
||||
* Interface version of the fluid network.
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public interface IFluidNetwork extends INodeNetwork<IFluidNetwork, IFluidConnector, IFluidHandler>
|
||||
{
|
||||
/** Called to build the network when something changes such as addition of a pipe */
|
||||
@Override
|
||||
void reconstruct();
|
||||
|
||||
/** Called to add fluid into the network
|
||||
/**
|
||||
* Called to add fluid into the network
|
||||
*
|
||||
* @param source - part that is receiving the fluid for the network
|
||||
* @param from - direction of this connection
|
||||
* @param resource - fluid stack that is being filled into the network
|
||||
* @param doFill - true causes the action to be taken, false simulates the action
|
||||
* @return amount of fluid filled into the network */
|
||||
* @return amount of fluid filled into the network
|
||||
*/
|
||||
int fill(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doFill);
|
||||
|
||||
/** Called to remove fluid from a network, not supported by all networks
|
||||
/**
|
||||
* Called to remove fluid from a network, not supported by all networks
|
||||
*
|
||||
* @param source - part that is receiving the fluid for the network
|
||||
* @param from - direction of this connection
|
||||
* @param resource - fluid stack that is being filled into the network
|
||||
* @param doDrain - true causes the action to be taken, false simulates the action
|
||||
* @return FluidStack that contains the fluid drained from the network */
|
||||
* @return FluidStack that contains the fluid drained from the network
|
||||
*/
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doDrain);
|
||||
|
||||
/** Called to remove fluid from a network, not supported by all networks
|
||||
/**
|
||||
* Called to remove fluid from a network, not supported by all networks
|
||||
*
|
||||
* @param source - part that is receiving the fluid for the network
|
||||
* @param from - direction of this connection
|
||||
* @param resource - fluid stack that is being filled into the network
|
||||
* @param doDrain - true causes the action to be taken, false simulates the action
|
||||
* @return FluidStack that contains the fluid drained from the network */
|
||||
* @return FluidStack that contains the fluid drained from the network
|
||||
*/
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, int resource, boolean doDrain);
|
||||
|
||||
/** Fluid tank that represents the entire network */
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
package resonantinduction.archaic.firebox;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Icon;
|
||||
|
|
|
@ -9,9 +9,7 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import universalelectricity.api.energy.EnergyStorageHandler;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.IPacketSender;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
|
|
|
@ -14,8 +14,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
|
||||
public class ItemImprint extends Item
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.archaic.process;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -9,17 +8,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.api.recipe.MachineRecipes;
|
||||
import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.archaic.crate.TileCrate;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import universalelectricity.api.vector.Vector2;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import universalelectricity.api.vector.VectorWorld;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.archaic.process;
|
|||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.render.RenderItemOverlayTile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
|
|
@ -20,6 +20,7 @@ public class TileMillstone extends TileExternalInventory implements IPacketRecei
|
|||
{
|
||||
private int grindCount = 0;
|
||||
|
||||
@Override
|
||||
public void onInventoryChanged()
|
||||
{
|
||||
grindCount = 0;
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SoundHandler
|
|||
{
|
||||
public static final SoundHandler INSTANCE = new SoundHandler();
|
||||
|
||||
public static final String[] SOUND_FILES = { "hammer.ogg", "grinder1.ogg", "grinder2.ogg", "grinder3.ogg", "grinder4.ogg", "electricshock1.ogg", "electricshock2.ogg", "electricshock3.ogg", "electricshock4.ogg", "electricshock5.ogg", "electricshock6.ogg", "electricshock7.ogg" , "conveyor.ogg" };
|
||||
public static final String[] SOUND_FILES = { "hammer.ogg", "grinder1.ogg", "grinder2.ogg", "grinder3.ogg", "grinder4.ogg", "electricshock1.ogg", "electricshock2.ogg", "electricshock3.ogg", "electricshock4.ogg", "electricshock5.ogg", "electricshock6.ogg", "electricshock7.ogg", "conveyor.ogg" };
|
||||
|
||||
@ForgeSubscribe
|
||||
public void loadSoundEvents(SoundLoadEvent event)
|
||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.util.Icon;
|
|||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -37,6 +36,6 @@ public class FluidEventHandler
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void textureHook(TextureStitchEvent.Post event)
|
||||
{
|
||||
//ResonantInduction.fluidMixture.setIcons(fluidIconMap.get(Reference.PREFIX + "mixture"));
|
||||
// ResonantInduction.fluidMixture.setIcons(fluidIconMap.get(Reference.PREFIX + "mixture"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,15 +3,13 @@
|
|||
*/
|
||||
package resonantinduction.core.handler;
|
||||
|
||||
import calclavia.components.tool.ToolMode;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import universalelectricity.api.vector.VectorWorld;
|
||||
import calclavia.components.tool.ToolMode;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,14 +6,16 @@ package resonantinduction.core.prefab.block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockSidedIO;
|
||||
|
||||
/** Blocks that have specific sided input and output should extend this.
|
||||
/**
|
||||
* Blocks that have specific sided input and output should extend this.
|
||||
*
|
||||
* @author Calclavia */
|
||||
* @author Calclavia
|
||||
*/
|
||||
public class BlockIOBase extends BlockSidedIO
|
||||
{
|
||||
public BlockIOBase(String name)
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockTile;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
|
|
|
@ -3,8 +3,8 @@ package resonantinduction.core.prefab.block;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockRotatable;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
|
|
|
@ -3,8 +3,8 @@ package resonantinduction.core.prefab.item;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
|
||||
/** @author Calclavia */
|
||||
public class ItemRI extends Item
|
||||
|
|
|
@ -2,8 +2,8 @@ package resonantinduction.core.prefab.part;
|
|||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import codechicken.multipart.JItemMultiPart;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,9 +13,11 @@ import calclavia.lib.prefab.tile.TileElectrical;
|
|||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
/** Prefab for general machines
|
||||
/**
|
||||
* Prefab for general machines
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
* @author Darkguardsman
|
||||
*/
|
||||
public class TileMachine extends TileElectrical implements IPacketReceiverWithID
|
||||
{
|
||||
/** Is the machine functioning normally */
|
||||
|
@ -42,7 +44,7 @@ public class TileMachine extends TileElectrical implements IPacketReceiverWithID
|
|||
{
|
||||
this.sendRunningPacket();
|
||||
}
|
||||
if(this.isFunctioning())
|
||||
if (this.isFunctioning())
|
||||
{
|
||||
this.consumePower(true);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.lwjgl.opengl.GL11;
|
|||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import resonantinduction.mechanical.gear.ItemGear;
|
|||
import resonantinduction.mechanical.gear.ItemGearShaft;
|
||||
import resonantinduction.mechanical.gear.RenderGear;
|
||||
import resonantinduction.mechanical.gear.RenderGearShaft;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -59,7 +58,7 @@ public class RenderRIItem implements IItemRenderer
|
|||
}
|
||||
else if (item.getItem() instanceof ItemMultimeter)
|
||||
{
|
||||
RenderMultimeter.INSTANCE.render();
|
||||
RenderMultimeter.render();
|
||||
}
|
||||
else if (item.getItem() instanceof ItemTransformer)
|
||||
{
|
||||
|
|
|
@ -5,13 +5,9 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityFallingSand;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.Reference;
|
||||
|
@ -46,7 +42,7 @@ public class BlockDust extends BlockRI
|
|||
|
||||
if (tileEntity instanceof TileMaterial)
|
||||
{
|
||||
((TileMaterial) tileEntity).name = ((ItemOreResource) itemStack.getItem()).getMaterialFromStack(itemStack);
|
||||
((TileMaterial) tileEntity).name = ItemOreResource.getMaterialFromStack(itemStack);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +143,7 @@ public class BlockDust extends BlockRI
|
|||
{
|
||||
int l = par1World.getBlockMetadata(par2, par3, par4) & 7;
|
||||
float f = 0.125F;
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) par2 + this.minX, (double) par3 + this.minY, (double) par4 + this.minZ, (double) par2 + this.maxX, (double) ((float) par3 + (float) l * f), (double) par4 + this.maxZ);
|
||||
return AxisAlignedBB.getAABBPool().getAABB(par2 + this.minX, par3 + this.minY, par4 + this.minZ, par2 + this.maxX, par3 + l * f, par4 + this.maxZ);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -197,7 +193,7 @@ public class BlockDust extends BlockRI
|
|||
protected void setBlockBoundsForDepth(int par1)
|
||||
{
|
||||
int j = par1 & 7;
|
||||
float f = (float) (2 * (1 + j)) / 16.0F;
|
||||
float f = 2 * (1 + j) / 16.0F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
package resonantinduction.core.resource;
|
||||
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
/**
|
||||
* A tile that stores the material name.
|
||||
*
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package resonantinduction.core.resource.fluid;
|
||||
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
@ -12,10 +9,8 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import resonantinduction.core.resource.TileMaterial;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ package resonantinduction.core.resource.fluid;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -17,6 +15,9 @@ import resonantinduction.core.ResonantInduction;
|
|||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
@ -20,7 +19,6 @@ import resonantinduction.core.resource.TileMaterial;
|
|||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
import calclavia.lib.utility.nbt.NBTUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -92,7 +90,7 @@ public class ItemOreResource extends ItemRI
|
|||
|
||||
if (k1 <= 6 && world.checkNoEntityCollision(block.getCollisionBoundingBoxFromPool(world, x, y, z)) && world.setBlockMetadataWithNotify(x, y, z, k1 + 1 | j1 & -8, 2))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
return true;
|
||||
}
|
||||
|
@ -137,7 +135,7 @@ public class ItemOreResource extends ItemRI
|
|||
|
||||
if (placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, k1))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,12 @@ import resonantinduction.core.prefab.item.ItemRI;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/** A meta data item containing parts of various crafting recipes. These parts do not do anything but
|
||||
/**
|
||||
* A meta data item containing parts of various crafting recipes. These parts do not do anything but
|
||||
* allow new crafting recipes to be created.
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public class ItemParts extends ItemRI
|
||||
{
|
||||
public ItemParts()
|
||||
|
@ -80,18 +82,10 @@ public class ItemParts extends ItemRI
|
|||
|
||||
public static enum Parts
|
||||
{
|
||||
Seal("leatherSeal"),
|
||||
GasSeal("gasSeal"),
|
||||
Tank("unfinishedTank"),
|
||||
Valve("valvePart"),
|
||||
MiningIcon("miningIcon", false),
|
||||
CircuitBasic("circuitBasic"),
|
||||
CircuitAdvanced("circuitAdvanced"),
|
||||
CircuitElite("circuitElite"),
|
||||
Motor("motor"),
|
||||
IC("ic_chip"),
|
||||
COIL("coilCopper"),
|
||||
LASER("diodeLaser");
|
||||
Seal("leatherSeal"), GasSeal("gasSeal"), Tank("unfinishedTank"), Valve("valvePart"),
|
||||
MiningIcon("miningIcon", false), CircuitBasic("circuitBasic"),
|
||||
CircuitAdvanced("circuitAdvanced"), CircuitElite("circuitElite"), Motor("motor"),
|
||||
IC("ic_chip"), COIL("coilCopper"), LASER("diodeLaser");
|
||||
|
||||
public String name;
|
||||
public Icon icon;
|
||||
|
|
|
@ -8,22 +8,17 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.electrical.battery.BlockBattery;
|
||||
import resonantinduction.electrical.battery.ItemBlockBattery;
|
||||
import resonantinduction.electrical.battery.TileBattery;
|
||||
import resonantinduction.electrical.encoder.BlockEncoder;
|
||||
import resonantinduction.electrical.encoder.ItemDisk;
|
||||
import resonantinduction.electrical.encoder.TileEncoder;
|
||||
import resonantinduction.electrical.furnace.BlockAdvancedFurnace;
|
||||
import resonantinduction.electrical.furnace.TileAdvancedFurnace;
|
||||
import resonantinduction.electrical.generator.BlockGenerator;
|
||||
import resonantinduction.electrical.generator.TileGenerator;
|
||||
import resonantinduction.electrical.generator.solar.BlockSolarPanel;
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BatteryNetwork extends Network<BatteryNetwork, TileBattery>
|
|||
/**
|
||||
* Apply energy loss.
|
||||
*/
|
||||
double percentageLoss = Math.max(0, (1 - ((double) (getConnectors().size() * 6) / 100d)));
|
||||
double percentageLoss = Math.max(0, (1 - (getConnectors().size() * 6 / 100d)));
|
||||
long energyLoss = (long) (percentageLoss * 100);
|
||||
totalEnergy -= energyLoss;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class BatteryNetwork extends Network<BatteryNetwork, TileBattery>
|
|||
if (battery != firstNode && !Arrays.asList(exclusion).contains(battery))
|
||||
{
|
||||
double percentage = ((double) battery.energy.getEnergyCapacity() / (double) totalCapacity);
|
||||
long energyForBattery = (long) Math.round(totalEnergy * percentage);
|
||||
long energyForBattery = Math.round(totalEnergy * percentage);
|
||||
battery.energy.setEnergy(energyForBattery);
|
||||
remainingEnergy -= energyForBattery;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,10 @@ public class BlockBattery extends BlockIOBase implements ITileEntityProvider
|
|||
{
|
||||
ItemBlockBattery itemBlock = (ItemBlockBattery) itemStack.getItem();
|
||||
TileBattery battery = (TileBattery) world.getBlockTileEntity(x, y, z);
|
||||
battery.energy.setCapacity(TileBattery.getEnergyForTier(itemBlock.getTier(itemStack)));
|
||||
battery.energy.setCapacity(TileBattery.getEnergyForTier(ItemBlockBattery.getTier(itemStack)));
|
||||
battery.energy.setEnergy(itemBlock.getEnergy(itemStack));
|
||||
battery.updateStructure();
|
||||
world.setBlockMetadataWithNotify(x, y, z, itemBlock.getTier(itemStack), 3);
|
||||
world.setBlockMetadataWithNotify(x, y, z, ItemBlockBattery.getTier(itemStack), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class BlockBattery extends BlockIOBase implements ITileEntityProvider
|
|||
{
|
||||
TileBattery battery = (TileBattery) world.getBlockTileEntity(x, y, z);
|
||||
ItemBlockBattery itemBlock = (ItemBlockBattery) itemStack.getItem();
|
||||
itemBlock.setTier(itemStack, (byte) metadata);
|
||||
ItemBlockBattery.setTier(itemStack, (byte) metadata);
|
||||
itemBlock.setEnergy(itemStack, battery.energy.getEnergy());
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public class TileBattery extends TileElectrical implements IConnector<BatteryNet
|
|||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(energy.getEnergy());
|
||||
data.add((short) ioMap);
|
||||
data.add(ioMap);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockThermopile extends BlockRI
|
||||
{
|
||||
|
|
|
@ -3,9 +3,7 @@ package resonantinduction.electrical.multimeter;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
/**
|
||||
* Graph for the multimeter
|
||||
|
|
|
@ -16,6 +16,7 @@ public class GraphF extends Graph<Float>
|
|||
queue += value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doneQueue()
|
||||
{
|
||||
super.doneQueue();
|
||||
|
@ -28,6 +29,7 @@ public class GraphF extends Graph<Float>
|
|||
return 0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(NBTTagCompound nbt)
|
||||
{
|
||||
super.load(nbt);
|
||||
|
@ -41,6 +43,7 @@ public class GraphF extends Graph<Float>
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound save()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
|
|
@ -16,6 +16,7 @@ public class GraphL extends Graph<Long>
|
|||
queue += value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doneQueue()
|
||||
{
|
||||
super.doneQueue();
|
||||
|
@ -28,6 +29,7 @@ public class GraphL extends Graph<Long>
|
|||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(NBTTagCompound nbt)
|
||||
{
|
||||
super.load(nbt);
|
||||
|
@ -40,6 +42,7 @@ public class GraphL extends Graph<Long>
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound save()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
|
|
@ -14,10 +14,8 @@ import resonantinduction.electrical.wire.EnumWireMaterial;
|
|||
import calclavia.lib.utility.LanguageUtility;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
|
||||
public class ItemMultimeter extends ItemMultipartBase
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ public class ItemTransformer extends ItemMultipartBase
|
|||
|
||||
if (part != null)
|
||||
{
|
||||
int l = MathHelper.floor_double((double) (player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
int l = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
int facing = l == 0 ? 2 : (l == 1 ? 5 : (l == 2 ? 3 : (l == 3 ? 4 : 0)));
|
||||
part.preparePlacement(side, facing);
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.Utility;
|
||||
import resonantinduction.electrical.wire.flat.PartFlatWire;
|
||||
import resonantinduction.electrical.wire.flat.RenderFlatWire;
|
||||
|
|
|
@ -383,7 +383,7 @@ public class PartFlatWire extends PartAdvancedWire implements TFacePart, JNormal
|
|||
// We found a wire! Merge networks!
|
||||
this.connections[absDir] = tp;
|
||||
|
||||
if(tp instanceof PartFlatWire)
|
||||
if (tp instanceof PartFlatWire)
|
||||
{
|
||||
this.getNetwork().merge(((PartFlatWire) tp).getNetwork());
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ public class PartFramedWire extends PartAdvancedWire implements TSlottedPart, JN
|
|||
{
|
||||
getNetwork().getConnectors().remove(this);
|
||||
super.bind(t);
|
||||
getNetwork().getConnectors().add((IConductor) this);
|
||||
getNetwork().getConnectors().add(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ public class PartFramedWire extends PartAdvancedWire implements TSlottedPart, JN
|
|||
try
|
||||
{
|
||||
this.getNetwork().removeConnector(this);
|
||||
this.getNetwork().split((IConductor) this);
|
||||
this.getNetwork().split(this);
|
||||
}
|
||||
catch (NullPointerException e)
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ public class TraitEnergyHandler extends TileMultipart implements IEnergyHandler
|
|||
@Override
|
||||
public boolean canInterface(ForgeDirection from)
|
||||
{
|
||||
if (this.partMap(from.ordinal()) == null)
|
||||
if (partMap(from.ordinal()) == null)
|
||||
{
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
|
|
|
@ -223,6 +223,7 @@ public class TileConveyorBelt extends TileMechanical implements IBelt, IRotatabl
|
|||
return from != getDirection() || from != getDirection().getOpposite();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh()
|
||||
{
|
||||
boolean didRefresh = false;
|
||||
|
@ -269,7 +270,7 @@ public class TileConveyorBelt extends TileMechanical implements IBelt, IRotatabl
|
|||
}
|
||||
else if (tile instanceof IMechanical)
|
||||
{
|
||||
IMechanical mechanical = (IMechanical) ((IMechanical) tile).getInstance(dir.getOpposite());
|
||||
IMechanical mechanical = ((IMechanical) tile).getInstance(dir.getOpposite());
|
||||
|
||||
if (mechanical != null)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,7 @@ public abstract class FluidNetwork extends NodeNetwork<IFluidNetwork, IFluidConn
|
|||
this.distributeConnectors();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reconstructConnector(IFluidConnector connector)
|
||||
{
|
||||
FluidTank tank = connector.getInternalTank();
|
||||
|
|
|
@ -13,9 +13,11 @@ import resonantinduction.api.fluid.IFluidNetwork;
|
|||
import resonantinduction.api.fluid.IFluidPipe;
|
||||
import calclavia.lib.utility.FluidUtility;
|
||||
|
||||
/** The network for pipe fluid transfer. getNodes() is NOT used.
|
||||
/**
|
||||
* The network for pipe fluid transfer. getNodes() is NOT used.
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public class PipeNetwork extends FluidNetwork
|
||||
{
|
||||
public HashMap<IFluidHandler, EnumSet<ForgeDirection>> sideMap = new HashMap<IFluidHandler, EnumSet<ForgeDirection>>();
|
||||
|
|
|
@ -188,7 +188,7 @@ public class PartPipe extends PartFramedConnection<EnumPipeMaterial, IFluidPipe,
|
|||
@Override
|
||||
public int getPressure()
|
||||
{
|
||||
if(this.getNetwork() != null)
|
||||
if (this.getNetwork() != null)
|
||||
{
|
||||
return this.getNetwork().getPressure();
|
||||
}
|
||||
|
|
|
@ -9,9 +9,11 @@ import resonantinduction.api.fluid.IFluidConnector;
|
|||
import resonantinduction.api.fluid.IFluidNetwork;
|
||||
import resonantinduction.mechanical.fluid.network.FluidNetwork;
|
||||
|
||||
/** Network that handles connected tanks
|
||||
/**
|
||||
* Network that handles connected tanks
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public class TankNetwork extends FluidNetwork
|
||||
{
|
||||
@Override
|
||||
|
@ -77,7 +79,8 @@ public class TankNetwork extends FluidNetwork
|
|||
@Override
|
||||
public int getPressure()
|
||||
{
|
||||
//TODO implement a compression system that would cause a tank to build up pressure greater than normal ATM
|
||||
// TODO implement a compression system that would cause a tank to build up pressure greater
|
||||
// than normal ATM
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ public class GearMultiBlockHandler extends MultiBlockHandler<PartGear>
|
|||
super(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartGear getWrapperAt(Vector3 position)
|
||||
{
|
||||
TileEntity tile = position.getTileEntity(self.getWorld());
|
||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.prefab.part.ItemMultipartBase;
|
||||
import resonantinduction.electrical.wire.EnumWireMaterial;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
|
|
|
@ -104,6 +104,7 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
getMultiBlock().update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkClientUpdate()
|
||||
{
|
||||
if (getMultiBlock().isPrimary())
|
||||
|
@ -149,6 +150,7 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
/**
|
||||
* Refresh should be called sparingly.
|
||||
*/
|
||||
@Override
|
||||
public void refresh()
|
||||
{
|
||||
connections = new Object[6];
|
||||
|
@ -215,7 +217,7 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
|||
|
||||
if (connections[checkDir.ordinal()] == null && checkTile instanceof IMechanical)
|
||||
{
|
||||
IMechanical instance = (IMechanical) ((IMechanical) checkTile).getInstance(placementSide);
|
||||
IMechanical instance = ((IMechanical) checkTile).getInstance(placementSide);
|
||||
|
||||
if (instance != null && instance != this && instance.canConnect(checkDir.getOpposite(), this) && !(instance instanceof PartGearShaft))
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.mechanical.gear;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
@ -13,7 +12,6 @@ import resonantinduction.mechanical.network.IMechanical;
|
|||
import resonantinduction.mechanical.network.PartMechanical;
|
||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
import codechicken.lib.vec.Rotation;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.PartMap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -40,6 +38,7 @@ public class PartGearShaft extends PartMechanical
|
|||
sides[6] = new IndexedCuboid6(6, new Cuboid6(0.36, 0.36, 0.36, 0.64, 0.64, 0.64));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preparePlacement(int side, int itemDamage)
|
||||
{
|
||||
ForgeDirection dir = ForgeDirection.getOrientation((byte) (side ^ 1));
|
||||
|
@ -63,6 +62,7 @@ public class PartGearShaft extends PartMechanical
|
|||
/**
|
||||
* Refresh should be called sparingly.
|
||||
*/
|
||||
@Override
|
||||
public void refresh()
|
||||
{
|
||||
connections = new Object[6];
|
||||
|
@ -95,7 +95,7 @@ public class PartGearShaft extends PartMechanical
|
|||
|
||||
if (checkTile instanceof IMechanical)
|
||||
{
|
||||
IMechanical instance = (IMechanical) ((IMechanical) checkTile).getInstance(checkDir.getOpposite());
|
||||
IMechanical instance = ((IMechanical) checkTile).getInstance(checkDir.getOpposite());
|
||||
|
||||
// Only connect to shafts outside of this block space.
|
||||
if (instance != null && instance != this && instance instanceof PartGearShaft && instance.canConnect(checkDir.getOpposite(), this))
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.mechanical.gear;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
|
@ -10,7 +9,6 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ package resonantinduction.mechanical.motor;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockRIRotatable;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import resonantinduction.electrical.generator.TileGenerator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockFluidMotor extends BlockRIRotatable
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ public class TileFluidMotor extends TileAdvanced implements IFluidHandler, IRota
|
|||
}
|
||||
if (tileOut instanceof IFluidHandler && !(tileOut instanceof TileFluidMotor))
|
||||
{
|
||||
//TODO pass fluid on to the other side of the motor and get average flow rate
|
||||
// TODO pass fluid on to the other side of the motor and get average flow rate
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -23,6 +23,7 @@ public interface IMechanical extends IConnector<IMechanicalNetwork>
|
|||
|
||||
public boolean inverseRotation(ForgeDirection dir, IMechanical with);
|
||||
|
||||
@Override
|
||||
public IMechanical getInstance(ForgeDirection dir);
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.LinkedHashMap;
|
|||
import java.util.LinkedHashSet;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.gear.PartGearShaft;
|
||||
import universalelectricity.api.net.IUpdate;
|
||||
import universalelectricity.core.net.Network;
|
||||
import universalelectricity.core.net.NetworkTickHandler;
|
||||
|
@ -136,7 +135,7 @@ public class MechanicalNetwork extends Network<IMechanicalNetwork, IMechanical>
|
|||
|
||||
if (deltaTime > 1)
|
||||
{
|
||||
rotation = (float) (((velocity) * ((double) deltaTime / 1000d) + rotation) % (2 * Math.PI));
|
||||
rotation = (float) (((velocity) * (deltaTime / 1000d) + rotation) % (2 * Math.PI));
|
||||
lastRotateTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ public class PacketNetwork<C extends IConnector> extends PacketType
|
|||
int y = data.readInt();
|
||||
int z = data.readInt();
|
||||
TileEntity tileEntity = player.worldObj.getBlockTileEntity(x, y, z);
|
||||
System.out.println(tileEntity+" rec: "+new Vector3(x,y,z));
|
||||
//TODO: Somehow this would receive the wrong coordinate once in a while...
|
||||
System.out.println(tileEntity + " rec: " + new Vector3(x, y, z));
|
||||
// TODO: Somehow this would receive the wrong coordinate once in a while...
|
||||
if (tileEntity != null && connectorClass.isAssignableFrom(tileEntity.getClass()))
|
||||
{
|
||||
C instance = (C) ((C) tileEntity).getInstance(ForgeDirection.getOrientation(data.readInt()));
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package resonantinduction.mechanical.network;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,11 +10,6 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
import codechicken.lib.vec.Rotation;
|
||||
import codechicken.lib.vec.Transformation;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.microblock.FaceMicroClass;
|
||||
import codechicken.multipart.JCuboidPart;
|
||||
import codechicken.multipart.JNormalOcclusion;
|
||||
import codechicken.multipart.TFacePart;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package resonantinduction.mechanical.network;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -13,6 +11,8 @@ import calclavia.lib.network.IPacketReceiver;
|
|||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.prefab.tile.TileAdvanced;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
public abstract class TileMechanical extends TileAdvanced implements IMechanical, IPacketReceiver
|
||||
{
|
||||
/** The mechanical connections this connector has made */
|
||||
|
|
|
@ -55,50 +55,50 @@ public class BlockFilter extends BlockRI implements ITileEntityProvider
|
|||
* Leak the fluid down.
|
||||
*/
|
||||
/*
|
||||
BlockFluidMixture fluidBlock = (BlockFluidMixture) ResonantInduction.blockFluidMixture;
|
||||
int amount = fluidBlock.getQuantaValue(world, x, y, z);
|
||||
|
||||
/**
|
||||
* BlockFluidMixture fluidBlock = (BlockFluidMixture)
|
||||
* ResonantInduction.blockFluidMixture;
|
||||
* int amount = fluidBlock.getQuantaValue(world, x, y, z);
|
||||
* /**
|
||||
* All fluid is filtered out, spawn all the items.
|
||||
*
|
||||
if (amount <= 1)
|
||||
{
|
||||
System.out.println("filter dropped");
|
||||
for (ItemStack itemStack : ((TileFluidMixture) tileAbove).items)
|
||||
{
|
||||
for (Resource resoure : MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER, itemStack))
|
||||
{
|
||||
InventoryUtility.dropItemStack(world, checkAbove.clone().add(0.5), resoure.getItemStack().copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int remaining = amount - 1;
|
||||
|
||||
/**
|
||||
* if (amount <= 1)
|
||||
* {
|
||||
* System.out.println("filter dropped");
|
||||
* for (ItemStack itemStack : ((TileFluidMixture) tileAbove).items)
|
||||
* {
|
||||
* for (Resource resoure : MachineRecipes.INSTANCE.getOutput(RecipeType.MIXER,
|
||||
* itemStack))
|
||||
* {
|
||||
* InventoryUtility.dropItemStack(world, checkAbove.clone().add(0.5),
|
||||
* resoure.getItemStack().copy());
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* int remaining = amount - 1;
|
||||
* /**
|
||||
* Remove liquid from top.
|
||||
*
|
||||
if (remaining > 0)
|
||||
{
|
||||
fluidBlock.setQuanta(world, checkAbove.intX(), checkAbove.intY(), checkAbove.intZ(), remaining);
|
||||
world.scheduleBlockUpdate(x, y, z, blockID, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkAbove.setBlock(world, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* if (remaining > 0)
|
||||
* {
|
||||
* fluidBlock.setQuanta(world, checkAbove.intX(), checkAbove.intY(),
|
||||
* checkAbove.intZ(), remaining);
|
||||
* world.scheduleBlockUpdate(x, y, z, blockID, 20);
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* checkAbove.setBlock(world, 0);
|
||||
* }
|
||||
* /**
|
||||
* Add liquid to bottom.
|
||||
*
|
||||
if (checkBelow.getBlockID(world) == ResonantInduction.blockFluidMixture.blockID)
|
||||
{
|
||||
fluidBlock.setQuanta(world, checkBelow.intX(), checkBelow.intY(), checkBelow.intZ(), fluidBlock.getQuantaValue(world, checkBelow.intX(), checkBelow.intY(), checkBelow.intZ()) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkBelow.setBlock(world, Block.waterStill.blockID, 3);
|
||||
}*/
|
||||
* if (checkBelow.getBlockID(world) == ResonantInduction.blockFluidMixture.blockID)
|
||||
* {
|
||||
* fluidBlock.setQuanta(world, checkBelow.intX(), checkBelow.intY(),
|
||||
* checkBelow.intZ(), fluidBlock.getQuantaValue(world, checkBelow.intX(),
|
||||
* checkBelow.intY(), checkBelow.intZ()) + 1);
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* checkBelow.setBlock(world, Block.waterStill.blockID, 3);
|
||||
* }
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package resonantinduction.mechanical.process;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import resonantinduction.api.recipe.MachineRecipes;
|
||||
import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.api.recipe.RecipeUtils.Resource;
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import resonantinduction.api.recipe.MachineRecipes;
|
||||
import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.resource.fluid.TileFluidMixture;
|
||||
import resonantinduction.mechanical.fluid.tank.TileTank;
|
||||
import resonantinduction.mechanical.network.TileMechanical;
|
||||
|
|
|
@ -7,9 +7,7 @@ import resonantinduction.core.Reference;
|
|||
import resonantinduction.core.Settings;
|
||||
import resonantinduction.core.TabRI;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import calclavia.lib.prefab.turbine.BlockTurbine;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.mechanical.turbine;
|
|||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TileWindTurbine extends TileTurbine implements IMechanical
|
|||
{
|
||||
BiomeGenBase biome = worldObj.getBiomeGenForCoords(xCoord, zCoord);
|
||||
boolean hasBonus = biome instanceof BiomeGenOcean || biome instanceof BiomeGenPlains || biome == BiomeGenBase.river;
|
||||
return (long) (worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / (float) 256) * 5 : 0) + (hasBonus ? 10 : 0);
|
||||
return (long) (worldObj.canBlockSeeTheSky(xCoord, yCoord + 4, zCoord) ? (((float) yCoord + 4) / 256) * 5 : 0) + (hasBonus ? 10 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue