Clean up
This commit is contained in:
parent
2bbc93b70a
commit
ef478755b1
53 changed files with 562 additions and 601 deletions
|
@ -7,45 +7,54 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
|||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import universalelectricity.api.net.INetwork;
|
||||
|
||||
/** Interface version of the fluid network.
|
||||
/**
|
||||
* Interface version of the fluid network.
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
* @author DarkGuardsman
|
||||
*/
|
||||
public interface IFluidNetwork extends INetwork<IFluidNetwork, IFluidConnector, IFluidHandler>
|
||||
{
|
||||
/** Called to build the network when something changes such as addition of a pipe */
|
||||
void reconstruct();
|
||||
/** Called to build the network when something changes such as addition of a pipe */
|
||||
@Override
|
||||
void reconstruct();
|
||||
|
||||
/** 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 */
|
||||
int fill(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doFill);
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
int fill(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doFill);
|
||||
|
||||
/** 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 */
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doDrain);
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, FluidStack resource, boolean doDrain);
|
||||
|
||||
/** 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 */
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, int resource, boolean doDrain);
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
FluidStack drain(IFluidConnector source, ForgeDirection from, int resource, boolean doDrain);
|
||||
|
||||
/** Fluid tank that represents the entire network */
|
||||
FluidTank getTank();
|
||||
/** Fluid tank that represents the entire network */
|
||||
FluidTank getTank();
|
||||
|
||||
/** Information about the network's tank */
|
||||
FluidTankInfo[] getTankInfo();
|
||||
/** Information about the network's tank */
|
||||
FluidTankInfo[] getTankInfo();
|
||||
|
||||
}
|
||||
|
|
|
@ -2,12 +2,14 @@ package resonantinduction.api.fluid;
|
|||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
/** Applied to tiles that work with pressure for there inputs
|
||||
/**
|
||||
* Applied to tiles that work with pressure for there inputs
|
||||
*
|
||||
* @author DarkGaurdsman */
|
||||
* @author DarkGaurdsman
|
||||
*/
|
||||
public interface IPressureInput
|
||||
{
|
||||
public int getPressureIn(ForgeDirection side);
|
||||
public int getPressureIn(ForgeDirection side);
|
||||
|
||||
public void onWrongPressure(ForgeDirection side, int pressure);
|
||||
public void onWrongPressure(ForgeDirection side, int pressure);
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@ package resonantinduction.api.fluid;
|
|||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
/** Applied to tiles that are a source of pressure in a fluid network
|
||||
/**
|
||||
* Applied to tiles that are a source of pressure in a fluid network
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
* @author Darkguardsman
|
||||
*/
|
||||
public interface IPressureOutput
|
||||
{
|
||||
public int getPressureOut(ForgeDirection side);
|
||||
public int getPressureOut(ForgeDirection side);
|
||||
}
|
||||
|
|
|
@ -3,14 +3,9 @@ package resonantinduction.archaic.blocks;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
|
|
@ -158,7 +158,7 @@ public class BlockEngineeringTable extends BlockRI
|
|||
{
|
||||
InventoryUtility.dropItemStack(world, new Vector3(player), output, 0);
|
||||
}
|
||||
|
||||
|
||||
tile.setInventorySlotContents(9, null);
|
||||
tile.onInventoryChanged();
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.archaic.firebox;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,8 +11,6 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ package resonantinduction.archaic.firebox;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -19,6 +17,8 @@ import resonantinduction.core.Reference;
|
|||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import universalelectricity.api.vector.Vector2;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockHotPlate extends BlockRI
|
||||
{
|
||||
|
@ -134,12 +134,12 @@ public class BlockHotPlate extends BlockRI
|
|||
|
||||
for (int spawn = 0; spawn < maxParticles; spawn++)
|
||||
{
|
||||
Vector3 particlePosition = new Vector3(x, y, z).translate((double) (i / 2) / ((double) 2) + (0.5 / ((double) 2)), 0.2, (double) (i % 2) / ((double) 2) + (0.5 / ((double) 2)));
|
||||
Vector3 particlePosition = new Vector3(x, y, z).translate((double) (i / 2) / ((double) 2) + (0.5 / (2)), 0.2, (double) (i % 2) / ((double) 2) + (0.5 / (2)));
|
||||
particlePosition.translate(new Vector3((random.nextFloat() - 0.5) * 0.2, (random.nextFloat() - 0.5) * 0.2, (random.nextFloat() - 0.5) * 0.2));
|
||||
world.spawnParticle("smoke", particlePosition.x, particlePosition.y, particlePosition.z, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
Vector3 particlePosition = new Vector3(x, y, z).translate((double) (i / 2) / ((double) 2) + (0.5 / ((double) 2)), 0.2, (double) (i % 2) / ((double) 2) + (0.5 / ((double) 2)));
|
||||
Vector3 particlePosition = new Vector3(x, y, z).translate((double) (i / 2) / ((double) 2) + (0.5 / (2)), 0.2, (double) (i % 2) / ((double) 2) + (0.5 / (2)));
|
||||
world.spawnParticle("flame", particlePosition.x, particlePosition.y, particlePosition.z, 0.0D, 0.01D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,16 +5,10 @@ import java.util.ArrayList;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.Settings;
|
||||
import universalelectricity.api.CompatibilityModule;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.network.IPacketReceiver;
|
||||
import calclavia.lib.network.IPacketSender;
|
||||
import calclavia.lib.prefab.tile.TileExternalInventory;
|
||||
|
|
|
@ -7,9 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.fluid.prefab.TileFluidNetwork;
|
||||
import calclavia.lib.render.ColorCode;
|
||||
|
||||
/**
|
||||
* Enum to hold info about each pipe material. Values are by default and some can change with pipe
|
||||
|
|
|
@ -17,8 +17,6 @@ import resonantinduction.core.resource.ResourceGenerator;
|
|||
import resonantinduction.core.resource.fluid.BlockFluidMixture;
|
||||
import resonantinduction.core.resource.fluid.TileFluidMixture;
|
||||
import resonantinduction.core.resource.item.ItemOreResource;
|
||||
import calclavia.lib.multiblock.fake.BlockMultiFake;
|
||||
import calclavia.lib.multiblock.fake.TileMultiBlockPart;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.network.PacketTile;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
|
|
@ -30,6 +30,7 @@ public class ContainerDummy extends Container
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player)
|
||||
{
|
||||
if (tile instanceof IPlayerUsing)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.core.prefab.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.core.prefab.block;
|
||||
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
@ -9,6 +8,7 @@ import resonantinduction.core.ResonantInductionTabs;
|
|||
import resonantinduction.core.Settings;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import calclavia.lib.prefab.block.BlockTile;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
|
||||
/**
|
||||
* Basic prefab for machine
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.core.prefab.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInductionTabs;
|
||||
|
|
|
@ -9,16 +9,16 @@ import resonantinduction.core.Settings;
|
|||
/** @author AidanBrady */
|
||||
public class ItemBase extends Item
|
||||
{
|
||||
public ItemBase(String name)
|
||||
{
|
||||
this(name, Settings.getNextItemID());
|
||||
}
|
||||
public ItemBase(String name)
|
||||
{
|
||||
this(name, Settings.getNextItemID());
|
||||
}
|
||||
|
||||
public ItemBase(String name, int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, name, id).getInt(id));
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
}
|
||||
public ItemBase(String name, int id)
|
||||
{
|
||||
super(Settings.CONFIGURATION.get(Configuration.CATEGORY_ITEM, name, id).getInt(id));
|
||||
this.setCreativeTab(ResonantInductionTabs.CORE);
|
||||
this.setUnlocalizedName(Reference.PREFIX + name);
|
||||
this.setTextureName(Reference.PREFIX + name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@ package resonantinduction.core.prefab.part;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import resonantinduction.core.Utility;
|
||||
import resonantinduction.electrical.wire.EnumWireMaterial;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
|
||||
|
|
|
@ -4,16 +4,13 @@ import java.util.Collection;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import resonantinduction.mechanical.fluid.pipe.PartPipe;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.api.CompatibilityModule;
|
||||
import universalelectricity.api.net.IConnector;
|
||||
import universalelectricity.api.net.INetwork;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
|
|
|
@ -41,7 +41,7 @@ public abstract class RenderImprintable extends TileEntitySpecialRenderer
|
|||
if (objectPosition.blockX == tileFilterable.xCoord && objectPosition.blockY == tileFilterable.yCoord && objectPosition.blockZ == tileFilterable.zCoord)
|
||||
{
|
||||
Set<ItemStack> filters = ItemBlockImprint.getFilters(filter);
|
||||
|
||||
|
||||
int i = 0;
|
||||
for (ItemStack filterStack : filters)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (inventory[i] != null)
|
||||
{
|
||||
Vector3 translation = new Vector3(x + (double) (i / matrixX) / ((double) matrixX) + (0.5 / ((double) matrixX)), y + 1.1, z + (double) (i % matrixZ) / ((double) matrixZ) + (0.5 / ((double) matrixZ)));
|
||||
Vector3 translation = new Vector3(x + (double) (i / matrixX) / ((double) matrixX) + (0.5 / (matrixX)), y + 1.1, z + (double) (i % matrixZ) / ((double) matrixZ) + (0.5 / (matrixZ)));
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(translation.x, translation.y, translation.z);
|
||||
GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
|
@ -243,9 +243,9 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
entityitem.getEntityItem().stackSize = 1;
|
||||
entityitem.hoverStart = 0.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-0.453125F * (float) dir.offsetX + position.x, position.y, -0.453125F * (float) dir.offsetZ + position.z);
|
||||
GL11.glTranslated(-0.453125F * dir.offsetX + position.x, position.y, -0.453125F * dir.offsetZ + position.z);
|
||||
GL11.glRotatef(180.0F + rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef((float) (90 * angle), 1, 0, 0);
|
||||
GL11.glRotatef(90 * angle, 1, 0, 0);
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
|
|
|
@ -23,7 +23,6 @@ import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
|||
import resonantinduction.api.recipe.OreDetectionBlackList;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.resource.item.ItemOreResource;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
package resonantinduction.core.resource.item;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.prefab.item.ItemBase;
|
||||
import resonantinduction.core.resource.ResourceGenerator;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
|
@ -35,7 +31,7 @@ public class ItemOreResource extends ItemBase
|
|||
{
|
||||
String dustName = getDustFromStack(is);
|
||||
List<ItemStack> list = OreDictionary.getOres("ingot" + dustName.substring(0, 1).toUpperCase() + dustName.substring(1));
|
||||
|
||||
|
||||
if (list.size() > 0)
|
||||
{
|
||||
ItemStack type = list.get(0);
|
||||
|
|
|
@ -28,12 +28,12 @@ public class CommonProxy extends ProxyBase
|
|||
{
|
||||
return new ContainerMultimeter(player.inventory, ((PartMultimeter) part));
|
||||
}
|
||||
}else if (tileEntity instanceof TileEncoder)
|
||||
}
|
||||
else if (tileEntity instanceof TileEncoder)
|
||||
{
|
||||
return new ContainerEncoder(player.inventory, (TileEncoder) tileEntity);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.prefab.block.BlockRI;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import calclavia.components.CalclaviaLoader;
|
||||
|
|
|
@ -49,7 +49,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
protected void actionPerformed(GuiButton button)
|
||||
{
|
||||
super.actionPerformed(button);
|
||||
if (((TileEncoder) tileEntity).getProgram() != null)
|
||||
if (tileEntity.getProgram() != null)
|
||||
{
|
||||
switch (button.id)
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
{
|
||||
super.handleMouseInput();
|
||||
int wheel = Mouse.getEventDWheel();
|
||||
if (((TileEncoder) tileEntity).getProgram() != null)
|
||||
if (tileEntity.getProgram() != null)
|
||||
{
|
||||
if (wheel > 0)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
else if (((TileEncoder) tileEntity).getProgram() != null)
|
||||
else if (tileEntity.getProgram() != null)
|
||||
{
|
||||
if (keycode == Keyboard.KEY_UP) // PAGE UP (no constant)
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
}
|
||||
else if (keycode == Keyboard.KEY_RIGHT) // PAGE RIGHT (no constant)
|
||||
{
|
||||
if (this.getTaskListElement().scrollX < ((TileEncoder) tileEntity).getProgram().getSize().intX())
|
||||
if (this.getTaskListElement().scrollX < tileEntity.getProgram().getSize().intX())
|
||||
this.getTaskListElement().scrollSide(1);
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
|
|||
|
||||
public TileEncoder getTile()
|
||||
{
|
||||
return (TileEncoder) this.tileEntity;
|
||||
return this.tileEntity;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -636,7 +636,7 @@ public class TileTesla extends TileElectrical implements IMultiBlockStructure<Ti
|
|||
|
||||
if (t instanceof TileTesla)
|
||||
{
|
||||
checkPosition.add(new Vector3((TileTesla) t).subtract(getPosition()));
|
||||
checkPosition.add(new Vector3(t).subtract(getPosition()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -27,7 +27,6 @@ import calclavia.lib.render.EnumColor;
|
|||
import calclavia.lib.utility.LanguageUtility;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.multipart.ControlKeyModifer;
|
||||
import codechicken.multipart.JItemMultiPart;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
|
|
@ -254,6 +254,7 @@ public abstract class PartAdvancedWire extends PartConductor
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getItem()
|
||||
{
|
||||
return EnumWireMaterial.values()[getMaterialID()].getWire();
|
||||
|
@ -328,6 +329,7 @@ public abstract class PartAdvancedWire extends PartConductor
|
|||
this.color = nbt.getInteger("dyeID");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRedstone(int side)
|
||||
{
|
||||
if (this.world().isBlockIndirectlyGettingPowered(x(), y(), z()))
|
||||
|
|
|
@ -108,7 +108,7 @@ public class TraitConductor extends TileMultipart implements IConductor
|
|||
{
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
//if (dir != from.getOpposite())
|
||||
// if (dir != from.getOpposite())
|
||||
{
|
||||
TMultiPart part = this.partMap(dir.ordinal());
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ import resonantinduction.core.ResonantInduction;
|
|||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import resonantinduction.mechanical.network.IMechanicalConnector;
|
||||
import resonantinduction.mechanical.network.IMechanicalNetwork;
|
||||
import resonantinduction.mechanical.network.MechanicalNetwork;
|
||||
import resonantinduction.mechanical.network.TileMechanical;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.network.IPacketReceiverWithID;
|
||||
|
|
|
@ -3,13 +3,10 @@ package resonantinduction.mechanical.fluid.pipe;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.fluid.prefab.TileFluidNetwork;
|
||||
import calclavia.lib.render.ColorCode;
|
||||
|
||||
/**
|
||||
* Enum to hold info about each pipe material. Values are by default and some can change with pipe
|
||||
|
|
|
@ -13,412 +13,412 @@ import resonantinduction.mechanical.fluid.prefab.TileFluidNetwork;
|
|||
|
||||
public class ModelOpenTrough extends ModelBase
|
||||
{
|
||||
// fields
|
||||
ModelRenderer base;
|
||||
ModelRenderer leftBase;
|
||||
ModelRenderer leftBaseB;
|
||||
ModelRenderer rightBaseB;
|
||||
ModelRenderer rightBase;
|
||||
ModelRenderer frontBase;
|
||||
ModelRenderer frontBaseB;
|
||||
ModelRenderer backBase;
|
||||
ModelRenderer backBaseB;
|
||||
ModelRenderer frontA;
|
||||
ModelRenderer frontB;
|
||||
ModelRenderer backA;
|
||||
ModelRenderer backB;
|
||||
ModelRenderer rightA;
|
||||
ModelRenderer rightB;
|
||||
ModelRenderer leftB;
|
||||
ModelRenderer leftA;
|
||||
ModelRenderer centerA;
|
||||
ModelRenderer centerB;
|
||||
ModelRenderer centerC;
|
||||
ModelRenderer centerD;
|
||||
ModelRenderer frontDoorA;
|
||||
ModelRenderer frontDoorB;
|
||||
ModelRenderer frontDoorC;
|
||||
ModelRenderer backDoorA;
|
||||
ModelRenderer backDoorB;
|
||||
ModelRenderer backDoorC;
|
||||
ModelRenderer leftDoorA;
|
||||
ModelRenderer leftDoorB;
|
||||
ModelRenderer leftDoorC;
|
||||
ModelRenderer rightDoorA;
|
||||
ModelRenderer rightDoorB;
|
||||
ModelRenderer rightDoorC;
|
||||
ModelRenderer cornerBackLeft;
|
||||
ModelRenderer cornerBackRight;
|
||||
ModelRenderer cornerFrontLeft;
|
||||
ModelRenderer cornerFrontRight;
|
||||
// fields
|
||||
ModelRenderer base;
|
||||
ModelRenderer leftBase;
|
||||
ModelRenderer leftBaseB;
|
||||
ModelRenderer rightBaseB;
|
||||
ModelRenderer rightBase;
|
||||
ModelRenderer frontBase;
|
||||
ModelRenderer frontBaseB;
|
||||
ModelRenderer backBase;
|
||||
ModelRenderer backBaseB;
|
||||
ModelRenderer frontA;
|
||||
ModelRenderer frontB;
|
||||
ModelRenderer backA;
|
||||
ModelRenderer backB;
|
||||
ModelRenderer rightA;
|
||||
ModelRenderer rightB;
|
||||
ModelRenderer leftB;
|
||||
ModelRenderer leftA;
|
||||
ModelRenderer centerA;
|
||||
ModelRenderer centerB;
|
||||
ModelRenderer centerC;
|
||||
ModelRenderer centerD;
|
||||
ModelRenderer frontDoorA;
|
||||
ModelRenderer frontDoorB;
|
||||
ModelRenderer frontDoorC;
|
||||
ModelRenderer backDoorA;
|
||||
ModelRenderer backDoorB;
|
||||
ModelRenderer backDoorC;
|
||||
ModelRenderer leftDoorA;
|
||||
ModelRenderer leftDoorB;
|
||||
ModelRenderer leftDoorC;
|
||||
ModelRenderer rightDoorA;
|
||||
ModelRenderer rightDoorB;
|
||||
ModelRenderer rightDoorC;
|
||||
ModelRenderer cornerBackLeft;
|
||||
ModelRenderer cornerBackRight;
|
||||
ModelRenderer cornerFrontLeft;
|
||||
ModelRenderer cornerFrontRight;
|
||||
|
||||
public ModelOpenTrough()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
public ModelOpenTrough()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
base = new ModelRenderer(this, 0, 0);
|
||||
base.addBox(-4F, 0F, -4F, 8, 2, 8);
|
||||
base.setRotationPoint(0F, 22F, 0F);
|
||||
base.setTextureSize(64, 32);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
leftBase = new ModelRenderer(this, 32, 0);
|
||||
leftBase.addBox(-4F, 0F, -4F, 4, 1, 8);
|
||||
leftBase.setRotationPoint(8F, 22F, 0F);
|
||||
leftBase.setTextureSize(64, 32);
|
||||
leftBase.mirror = true;
|
||||
setRotation(leftBase, 0F, 0F, 0F);
|
||||
leftBaseB = new ModelRenderer(this, 36, 10);
|
||||
leftBaseB.addBox(-4F, 0F, -3F, 4, 1, 6);
|
||||
leftBaseB.setRotationPoint(8F, 23F, 0F);
|
||||
leftBaseB.setTextureSize(64, 32);
|
||||
leftBaseB.mirror = true;
|
||||
setRotation(leftBaseB, 0F, 0F, 0F);
|
||||
rightBaseB = new ModelRenderer(this, 36, 10);
|
||||
rightBaseB.addBox(-4F, 0F, -3F, 4, 1, 6);
|
||||
rightBaseB.setRotationPoint(-4F, 23F, 0F);
|
||||
rightBaseB.setTextureSize(64, 32);
|
||||
rightBaseB.mirror = true;
|
||||
setRotation(rightBaseB, 0F, 0F, 0F);
|
||||
rightBase = new ModelRenderer(this, 32, 0);
|
||||
rightBase.addBox(-4F, 0F, -4F, 4, 1, 8);
|
||||
rightBase.setRotationPoint(-4F, 22F, 0F);
|
||||
rightBase.setTextureSize(64, 32);
|
||||
rightBase.mirror = true;
|
||||
setRotation(rightBase, 0F, 0F, 0F);
|
||||
frontBase = new ModelRenderer(this, 60, 6);
|
||||
frontBase.addBox(-3F, 0F, -4F, 6, 1, 4);
|
||||
frontBase.setRotationPoint(0F, 23F, -4F);
|
||||
frontBase.setTextureSize(64, 32);
|
||||
frontBase.mirror = true;
|
||||
setRotation(frontBase, 0F, 0F, 0F);
|
||||
frontBaseB = new ModelRenderer(this, 58, 0);
|
||||
frontBaseB.addBox(-4F, 0F, -4F, 8, 1, 4);
|
||||
frontBaseB.setRotationPoint(0F, 22F, -4F);
|
||||
frontBaseB.setTextureSize(64, 32);
|
||||
frontBaseB.mirror = true;
|
||||
setRotation(frontBaseB, 0F, 0F, 0F);
|
||||
backBase = new ModelRenderer(this, 58, 0);
|
||||
backBase.addBox(-4F, 0F, -4F, 8, 1, 4);
|
||||
backBase.setRotationPoint(0F, 22F, 8F);
|
||||
backBase.setTextureSize(64, 32);
|
||||
backBase.mirror = true;
|
||||
setRotation(backBase, 0F, 0F, 0F);
|
||||
backBaseB = new ModelRenderer(this, 60, 6);
|
||||
backBaseB.addBox(-3F, 0F, -4F, 6, 1, 4);
|
||||
backBaseB.setRotationPoint(0F, 23F, 8F);
|
||||
backBaseB.setTextureSize(64, 32);
|
||||
backBaseB.mirror = true;
|
||||
setRotation(backBaseB, 0F, 0F, 0F);
|
||||
frontA = new ModelRenderer(this, 0, 12);
|
||||
frontA.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
frontA.setRotationPoint(0F, 15F, -4F);
|
||||
frontA.setTextureSize(64, 32);
|
||||
frontA.mirror = true;
|
||||
setRotation(frontA, 0F, 0F, 0F);
|
||||
frontB = new ModelRenderer(this, 0, 12);
|
||||
frontB.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
frontB.setRotationPoint(6F, 15F, -4F);
|
||||
frontB.setTextureSize(64, 32);
|
||||
frontB.mirror = true;
|
||||
setRotation(frontB, 0F, 0F, 0F);
|
||||
backA = new ModelRenderer(this, 0, 12);
|
||||
backA.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
backA.setRotationPoint(0F, 15F, 8F);
|
||||
backA.setTextureSize(64, 32);
|
||||
backA.mirror = true;
|
||||
setRotation(backA, 0F, 0F, 0F);
|
||||
backB = new ModelRenderer(this, 0, 12);
|
||||
backB.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
backB.setRotationPoint(6F, 15F, 8F);
|
||||
backB.setTextureSize(64, 32);
|
||||
backB.mirror = true;
|
||||
setRotation(backB, 0F, 0F, 0F);
|
||||
rightA = new ModelRenderer(this, 13, 12);
|
||||
rightA.addBox(-8F, 0F, 0F, 4, 7, 2);
|
||||
rightA.setRotationPoint(0F, 15F, -4F);
|
||||
rightA.setTextureSize(64, 32);
|
||||
rightA.mirror = true;
|
||||
setRotation(rightA, 0F, 0F, 0F);
|
||||
rightB = new ModelRenderer(this, 13, 12);
|
||||
rightB.addBox(-8F, 0F, 6F, 4, 7, 2);
|
||||
rightB.setRotationPoint(0F, 15F, -4F);
|
||||
rightB.setTextureSize(64, 32);
|
||||
rightB.mirror = true;
|
||||
setRotation(rightB, 0F, 0F, 0F);
|
||||
leftB = new ModelRenderer(this, 13, 12);
|
||||
leftB.addBox(4F, 0F, 6F, 4, 7, 2);
|
||||
leftB.setRotationPoint(0F, 15F, -4F);
|
||||
leftB.setTextureSize(64, 32);
|
||||
leftB.mirror = true;
|
||||
setRotation(leftB, 0F, 0F, 0F);
|
||||
leftA = new ModelRenderer(this, 13, 12);
|
||||
leftA.addBox(4F, 0F, 0F, 4, 7, 2);
|
||||
leftA.setRotationPoint(0F, 15F, -4F);
|
||||
leftA.setTextureSize(64, 32);
|
||||
leftA.mirror = true;
|
||||
setRotation(leftA, 0F, 0F, 0F);
|
||||
centerA = new ModelRenderer(this, 27, 12);
|
||||
centerA.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerA.setRotationPoint(6F, 15F, 6F);
|
||||
centerA.setTextureSize(64, 32);
|
||||
centerA.mirror = true;
|
||||
setRotation(centerA, 0F, 0F, 0F);
|
||||
centerB = new ModelRenderer(this, 27, 12);
|
||||
centerB.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerB.setRotationPoint(6F, 15F, 0F);
|
||||
centerB.setTextureSize(64, 32);
|
||||
centerB.mirror = true;
|
||||
setRotation(centerB, 0F, 0F, 0F);
|
||||
centerC = new ModelRenderer(this, 27, 12);
|
||||
centerC.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerC.setRotationPoint(0F, 15F, 0F);
|
||||
centerC.setTextureSize(64, 32);
|
||||
centerC.mirror = true;
|
||||
setRotation(centerC, 0F, 0F, 0F);
|
||||
centerD = new ModelRenderer(this, 27, 12);
|
||||
centerD.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerD.setRotationPoint(0F, 15F, 6F);
|
||||
centerD.setTextureSize(64, 32);
|
||||
centerD.mirror = true;
|
||||
setRotation(centerD, 0F, 0F, 0F);
|
||||
frontDoorA = new ModelRenderer(this, 0, 25);
|
||||
frontDoorA.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorA.setRotationPoint(2F, 15F, -4F);
|
||||
frontDoorA.setTextureSize(64, 32);
|
||||
frontDoorA.mirror = true;
|
||||
setRotation(frontDoorA, 0F, 0F, 0F);
|
||||
frontDoorB = new ModelRenderer(this, 0, 25);
|
||||
frontDoorB.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorB.setRotationPoint(2F, 15F, -2F);
|
||||
frontDoorB.setTextureSize(64, 32);
|
||||
frontDoorB.mirror = true;
|
||||
setRotation(frontDoorB, 0F, 0F, 0F);
|
||||
frontDoorC = new ModelRenderer(this, 0, 25);
|
||||
frontDoorC.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorC.setRotationPoint(2F, 15F, 0F);
|
||||
frontDoorC.setTextureSize(64, 32);
|
||||
frontDoorC.mirror = true;
|
||||
setRotation(frontDoorC, 0F, 0F, 0F);
|
||||
backDoorA = new ModelRenderer(this, 0, 25);
|
||||
backDoorA.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorA.setRotationPoint(2F, 15F, 10F);
|
||||
backDoorA.setTextureSize(64, 32);
|
||||
backDoorA.mirror = true;
|
||||
setRotation(backDoorA, 0F, 0F, 0F);
|
||||
backDoorB = new ModelRenderer(this, 0, 25);
|
||||
backDoorB.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorB.setRotationPoint(2F, 15F, 8F);
|
||||
backDoorB.setTextureSize(64, 32);
|
||||
backDoorB.mirror = true;
|
||||
setRotation(backDoorB, 0F, 0F, 0F);
|
||||
backDoorC = new ModelRenderer(this, 0, 25);
|
||||
backDoorC.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorC.setRotationPoint(2F, 15F, 6F);
|
||||
backDoorC.setTextureSize(64, 32);
|
||||
backDoorC.mirror = true;
|
||||
setRotation(backDoorC, 0F, 0F, 0F);
|
||||
leftDoorA = new ModelRenderer(this, 16, 24);
|
||||
leftDoorA.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorA.setRotationPoint(2F, 15F, -8F);
|
||||
leftDoorA.setTextureSize(64, 32);
|
||||
leftDoorA.mirror = true;
|
||||
setRotation(leftDoorA, 0F, 0F, 0F);
|
||||
leftDoorB = new ModelRenderer(this, 16, 24);
|
||||
leftDoorB.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorB.setRotationPoint(0F, 15F, -8F);
|
||||
leftDoorB.setTextureSize(64, 32);
|
||||
leftDoorB.mirror = true;
|
||||
setRotation(leftDoorB, 0F, 0F, 0F);
|
||||
leftDoorC = new ModelRenderer(this, 16, 24);
|
||||
leftDoorC.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorC.setRotationPoint(-2F, 15F, -8F);
|
||||
leftDoorC.setTextureSize(64, 32);
|
||||
leftDoorC.mirror = true;
|
||||
setRotation(leftDoorC, 0F, 0F, 0F);
|
||||
rightDoorA = new ModelRenderer(this, 16, 24);
|
||||
rightDoorA.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorA.setRotationPoint(-12F, 15F, -8F);
|
||||
rightDoorA.setTextureSize(64, 32);
|
||||
rightDoorA.mirror = true;
|
||||
setRotation(rightDoorA, 0F, 0F, 0F);
|
||||
rightDoorB = new ModelRenderer(this, 16, 24);
|
||||
rightDoorB.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorB.setRotationPoint(-10F, 15F, -8F);
|
||||
rightDoorB.setTextureSize(64, 32);
|
||||
rightDoorB.mirror = true;
|
||||
setRotation(rightDoorB, 0F, 0F, 0F);
|
||||
rightDoorC = new ModelRenderer(this, 16, 24);
|
||||
rightDoorC.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorC.setRotationPoint(-8F, 15F, -8F);
|
||||
rightDoorC.setTextureSize(64, 32);
|
||||
rightDoorC.mirror = true;
|
||||
setRotation(rightDoorC, 0F, 0F, 0F);
|
||||
cornerBackLeft = new ModelRenderer(this, 0, 37);
|
||||
cornerBackLeft.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerBackLeft.setRotationPoint(8F, 14F, 8F);
|
||||
cornerBackLeft.setTextureSize(64, 32);
|
||||
cornerBackLeft.mirror = true;
|
||||
setRotation(cornerBackLeft, 0F, 0F, 0F);
|
||||
cornerBackRight = new ModelRenderer(this, 0, 37);
|
||||
cornerBackRight.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerBackRight.setRotationPoint(-4F, 14F, 8F);
|
||||
cornerBackRight.setTextureSize(64, 32);
|
||||
cornerBackRight.mirror = true;
|
||||
setRotation(cornerBackRight, 0F, 0F, 0F);
|
||||
cornerFrontLeft = new ModelRenderer(this, 0, 37);
|
||||
cornerFrontLeft.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerFrontLeft.setRotationPoint(8F, 14F, -4F);
|
||||
cornerFrontLeft.setTextureSize(64, 32);
|
||||
cornerFrontLeft.mirror = true;
|
||||
setRotation(cornerFrontLeft, 0F, 0F, 0F);
|
||||
cornerFrontRight = new ModelRenderer(this, 0, 37);
|
||||
cornerFrontRight.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerFrontRight.setRotationPoint(-4F, 14F, -4F);
|
||||
cornerFrontRight.setTextureSize(64, 32);
|
||||
cornerFrontRight.mirror = true;
|
||||
setRotation(cornerFrontRight, 0F, 0F, 0F);
|
||||
}
|
||||
base = new ModelRenderer(this, 0, 0);
|
||||
base.addBox(-4F, 0F, -4F, 8, 2, 8);
|
||||
base.setRotationPoint(0F, 22F, 0F);
|
||||
base.setTextureSize(64, 32);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
leftBase = new ModelRenderer(this, 32, 0);
|
||||
leftBase.addBox(-4F, 0F, -4F, 4, 1, 8);
|
||||
leftBase.setRotationPoint(8F, 22F, 0F);
|
||||
leftBase.setTextureSize(64, 32);
|
||||
leftBase.mirror = true;
|
||||
setRotation(leftBase, 0F, 0F, 0F);
|
||||
leftBaseB = new ModelRenderer(this, 36, 10);
|
||||
leftBaseB.addBox(-4F, 0F, -3F, 4, 1, 6);
|
||||
leftBaseB.setRotationPoint(8F, 23F, 0F);
|
||||
leftBaseB.setTextureSize(64, 32);
|
||||
leftBaseB.mirror = true;
|
||||
setRotation(leftBaseB, 0F, 0F, 0F);
|
||||
rightBaseB = new ModelRenderer(this, 36, 10);
|
||||
rightBaseB.addBox(-4F, 0F, -3F, 4, 1, 6);
|
||||
rightBaseB.setRotationPoint(-4F, 23F, 0F);
|
||||
rightBaseB.setTextureSize(64, 32);
|
||||
rightBaseB.mirror = true;
|
||||
setRotation(rightBaseB, 0F, 0F, 0F);
|
||||
rightBase = new ModelRenderer(this, 32, 0);
|
||||
rightBase.addBox(-4F, 0F, -4F, 4, 1, 8);
|
||||
rightBase.setRotationPoint(-4F, 22F, 0F);
|
||||
rightBase.setTextureSize(64, 32);
|
||||
rightBase.mirror = true;
|
||||
setRotation(rightBase, 0F, 0F, 0F);
|
||||
frontBase = new ModelRenderer(this, 60, 6);
|
||||
frontBase.addBox(-3F, 0F, -4F, 6, 1, 4);
|
||||
frontBase.setRotationPoint(0F, 23F, -4F);
|
||||
frontBase.setTextureSize(64, 32);
|
||||
frontBase.mirror = true;
|
||||
setRotation(frontBase, 0F, 0F, 0F);
|
||||
frontBaseB = new ModelRenderer(this, 58, 0);
|
||||
frontBaseB.addBox(-4F, 0F, -4F, 8, 1, 4);
|
||||
frontBaseB.setRotationPoint(0F, 22F, -4F);
|
||||
frontBaseB.setTextureSize(64, 32);
|
||||
frontBaseB.mirror = true;
|
||||
setRotation(frontBaseB, 0F, 0F, 0F);
|
||||
backBase = new ModelRenderer(this, 58, 0);
|
||||
backBase.addBox(-4F, 0F, -4F, 8, 1, 4);
|
||||
backBase.setRotationPoint(0F, 22F, 8F);
|
||||
backBase.setTextureSize(64, 32);
|
||||
backBase.mirror = true;
|
||||
setRotation(backBase, 0F, 0F, 0F);
|
||||
backBaseB = new ModelRenderer(this, 60, 6);
|
||||
backBaseB.addBox(-3F, 0F, -4F, 6, 1, 4);
|
||||
backBaseB.setRotationPoint(0F, 23F, 8F);
|
||||
backBaseB.setTextureSize(64, 32);
|
||||
backBaseB.mirror = true;
|
||||
setRotation(backBaseB, 0F, 0F, 0F);
|
||||
frontA = new ModelRenderer(this, 0, 12);
|
||||
frontA.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
frontA.setRotationPoint(0F, 15F, -4F);
|
||||
frontA.setTextureSize(64, 32);
|
||||
frontA.mirror = true;
|
||||
setRotation(frontA, 0F, 0F, 0F);
|
||||
frontB = new ModelRenderer(this, 0, 12);
|
||||
frontB.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
frontB.setRotationPoint(6F, 15F, -4F);
|
||||
frontB.setTextureSize(64, 32);
|
||||
frontB.mirror = true;
|
||||
setRotation(frontB, 0F, 0F, 0F);
|
||||
backA = new ModelRenderer(this, 0, 12);
|
||||
backA.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
backA.setRotationPoint(0F, 15F, 8F);
|
||||
backA.setTextureSize(64, 32);
|
||||
backA.mirror = true;
|
||||
setRotation(backA, 0F, 0F, 0F);
|
||||
backB = new ModelRenderer(this, 0, 12);
|
||||
backB.addBox(-4F, 0F, -4F, 2, 7, 4);
|
||||
backB.setRotationPoint(6F, 15F, 8F);
|
||||
backB.setTextureSize(64, 32);
|
||||
backB.mirror = true;
|
||||
setRotation(backB, 0F, 0F, 0F);
|
||||
rightA = new ModelRenderer(this, 13, 12);
|
||||
rightA.addBox(-8F, 0F, 0F, 4, 7, 2);
|
||||
rightA.setRotationPoint(0F, 15F, -4F);
|
||||
rightA.setTextureSize(64, 32);
|
||||
rightA.mirror = true;
|
||||
setRotation(rightA, 0F, 0F, 0F);
|
||||
rightB = new ModelRenderer(this, 13, 12);
|
||||
rightB.addBox(-8F, 0F, 6F, 4, 7, 2);
|
||||
rightB.setRotationPoint(0F, 15F, -4F);
|
||||
rightB.setTextureSize(64, 32);
|
||||
rightB.mirror = true;
|
||||
setRotation(rightB, 0F, 0F, 0F);
|
||||
leftB = new ModelRenderer(this, 13, 12);
|
||||
leftB.addBox(4F, 0F, 6F, 4, 7, 2);
|
||||
leftB.setRotationPoint(0F, 15F, -4F);
|
||||
leftB.setTextureSize(64, 32);
|
||||
leftB.mirror = true;
|
||||
setRotation(leftB, 0F, 0F, 0F);
|
||||
leftA = new ModelRenderer(this, 13, 12);
|
||||
leftA.addBox(4F, 0F, 0F, 4, 7, 2);
|
||||
leftA.setRotationPoint(0F, 15F, -4F);
|
||||
leftA.setTextureSize(64, 32);
|
||||
leftA.mirror = true;
|
||||
setRotation(leftA, 0F, 0F, 0F);
|
||||
centerA = new ModelRenderer(this, 27, 12);
|
||||
centerA.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerA.setRotationPoint(6F, 15F, 6F);
|
||||
centerA.setTextureSize(64, 32);
|
||||
centerA.mirror = true;
|
||||
setRotation(centerA, 0F, 0F, 0F);
|
||||
centerB = new ModelRenderer(this, 27, 12);
|
||||
centerB.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerB.setRotationPoint(6F, 15F, 0F);
|
||||
centerB.setTextureSize(64, 32);
|
||||
centerB.mirror = true;
|
||||
setRotation(centerB, 0F, 0F, 0F);
|
||||
centerC = new ModelRenderer(this, 27, 12);
|
||||
centerC.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerC.setRotationPoint(0F, 15F, 0F);
|
||||
centerC.setTextureSize(64, 32);
|
||||
centerC.mirror = true;
|
||||
setRotation(centerC, 0F, 0F, 0F);
|
||||
centerD = new ModelRenderer(this, 27, 12);
|
||||
centerD.addBox(-4F, 0F, -4F, 2, 7, 2);
|
||||
centerD.setRotationPoint(0F, 15F, 6F);
|
||||
centerD.setTextureSize(64, 32);
|
||||
centerD.mirror = true;
|
||||
setRotation(centerD, 0F, 0F, 0F);
|
||||
frontDoorA = new ModelRenderer(this, 0, 25);
|
||||
frontDoorA.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorA.setRotationPoint(2F, 15F, -4F);
|
||||
frontDoorA.setTextureSize(64, 32);
|
||||
frontDoorA.mirror = true;
|
||||
setRotation(frontDoorA, 0F, 0F, 0F);
|
||||
frontDoorB = new ModelRenderer(this, 0, 25);
|
||||
frontDoorB.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorB.setRotationPoint(2F, 15F, -2F);
|
||||
frontDoorB.setTextureSize(64, 32);
|
||||
frontDoorB.mirror = true;
|
||||
setRotation(frontDoorB, 0F, 0F, 0F);
|
||||
frontDoorC = new ModelRenderer(this, 0, 25);
|
||||
frontDoorC.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
frontDoorC.setRotationPoint(2F, 15F, 0F);
|
||||
frontDoorC.setTextureSize(64, 32);
|
||||
frontDoorC.mirror = true;
|
||||
setRotation(frontDoorC, 0F, 0F, 0F);
|
||||
backDoorA = new ModelRenderer(this, 0, 25);
|
||||
backDoorA.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorA.setRotationPoint(2F, 15F, 10F);
|
||||
backDoorA.setTextureSize(64, 32);
|
||||
backDoorA.mirror = true;
|
||||
setRotation(backDoorA, 0F, 0F, 0F);
|
||||
backDoorB = new ModelRenderer(this, 0, 25);
|
||||
backDoorB.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorB.setRotationPoint(2F, 15F, 8F);
|
||||
backDoorB.setTextureSize(64, 32);
|
||||
backDoorB.mirror = true;
|
||||
setRotation(backDoorB, 0F, 0F, 0F);
|
||||
backDoorC = new ModelRenderer(this, 0, 25);
|
||||
backDoorC.addBox(-4F, 0F, -4F, 4, 7, 2);
|
||||
backDoorC.setRotationPoint(2F, 15F, 6F);
|
||||
backDoorC.setTextureSize(64, 32);
|
||||
backDoorC.mirror = true;
|
||||
setRotation(backDoorC, 0F, 0F, 0F);
|
||||
leftDoorA = new ModelRenderer(this, 16, 24);
|
||||
leftDoorA.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorA.setRotationPoint(2F, 15F, -8F);
|
||||
leftDoorA.setTextureSize(64, 32);
|
||||
leftDoorA.mirror = true;
|
||||
setRotation(leftDoorA, 0F, 0F, 0F);
|
||||
leftDoorB = new ModelRenderer(this, 16, 24);
|
||||
leftDoorB.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorB.setRotationPoint(0F, 15F, -8F);
|
||||
leftDoorB.setTextureSize(64, 32);
|
||||
leftDoorB.mirror = true;
|
||||
setRotation(leftDoorB, 0F, 0F, 0F);
|
||||
leftDoorC = new ModelRenderer(this, 16, 24);
|
||||
leftDoorC.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
leftDoorC.setRotationPoint(-2F, 15F, -8F);
|
||||
leftDoorC.setTextureSize(64, 32);
|
||||
leftDoorC.mirror = true;
|
||||
setRotation(leftDoorC, 0F, 0F, 0F);
|
||||
rightDoorA = new ModelRenderer(this, 16, 24);
|
||||
rightDoorA.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorA.setRotationPoint(-12F, 15F, -8F);
|
||||
rightDoorA.setTextureSize(64, 32);
|
||||
rightDoorA.mirror = true;
|
||||
setRotation(rightDoorA, 0F, 0F, 0F);
|
||||
rightDoorB = new ModelRenderer(this, 16, 24);
|
||||
rightDoorB.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorB.setRotationPoint(-10F, 15F, -8F);
|
||||
rightDoorB.setTextureSize(64, 32);
|
||||
rightDoorB.mirror = true;
|
||||
setRotation(rightDoorB, 0F, 0F, 0F);
|
||||
rightDoorC = new ModelRenderer(this, 16, 24);
|
||||
rightDoorC.addBox(4F, 0F, 6F, 2, 7, 4);
|
||||
rightDoorC.setRotationPoint(-8F, 15F, -8F);
|
||||
rightDoorC.setTextureSize(64, 32);
|
||||
rightDoorC.mirror = true;
|
||||
setRotation(rightDoorC, 0F, 0F, 0F);
|
||||
cornerBackLeft = new ModelRenderer(this, 0, 37);
|
||||
cornerBackLeft.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerBackLeft.setRotationPoint(8F, 14F, 8F);
|
||||
cornerBackLeft.setTextureSize(64, 32);
|
||||
cornerBackLeft.mirror = true;
|
||||
setRotation(cornerBackLeft, 0F, 0F, 0F);
|
||||
cornerBackRight = new ModelRenderer(this, 0, 37);
|
||||
cornerBackRight.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerBackRight.setRotationPoint(-4F, 14F, 8F);
|
||||
cornerBackRight.setTextureSize(64, 32);
|
||||
cornerBackRight.mirror = true;
|
||||
setRotation(cornerBackRight, 0F, 0F, 0F);
|
||||
cornerFrontLeft = new ModelRenderer(this, 0, 37);
|
||||
cornerFrontLeft.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerFrontLeft.setRotationPoint(8F, 14F, -4F);
|
||||
cornerFrontLeft.setTextureSize(64, 32);
|
||||
cornerFrontLeft.mirror = true;
|
||||
setRotation(cornerFrontLeft, 0F, 0F, 0F);
|
||||
cornerFrontRight = new ModelRenderer(this, 0, 37);
|
||||
cornerFrontRight.addBox(-4F, 0F, -4F, 4, 10, 4);
|
||||
cornerFrontRight.setRotationPoint(-4F, 14F, -4F);
|
||||
cornerFrontRight.setTextureSize(64, 32);
|
||||
cornerFrontRight.mirror = true;
|
||||
setRotation(cornerFrontRight, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(byte side, boolean stone)
|
||||
{
|
||||
renderMiddle(TileFluidNetwork.canRenderSide(side, ForgeDirection.DOWN), stone);
|
||||
renderBack(TileFluidNetwork.canRenderSide(side, ForgeDirection.NORTH) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderFront(TileFluidNetwork.canRenderSide(side, ForgeDirection.SOUTH) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderRight(TileFluidNetwork.canRenderSide(side, ForgeDirection.WEST) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderLeft(TileFluidNetwork.canRenderSide(side, ForgeDirection.EAST) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
}
|
||||
public void render(byte side, boolean stone)
|
||||
{
|
||||
renderMiddle(TileFluidNetwork.canRenderSide(side, ForgeDirection.DOWN), stone);
|
||||
renderBack(TileFluidNetwork.canRenderSide(side, ForgeDirection.NORTH) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderFront(TileFluidNetwork.canRenderSide(side, ForgeDirection.SOUTH) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderRight(TileFluidNetwork.canRenderSide(side, ForgeDirection.WEST) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
renderLeft(TileFluidNetwork.canRenderSide(side, ForgeDirection.EAST) ? PipeType.NORMAL : stone ? PipeType.SOLID : PipeType.MID_CAP);
|
||||
}
|
||||
|
||||
public void renderMiddle(boolean bottom, boolean corners)
|
||||
{
|
||||
if (bottom)
|
||||
base.render(0.0625F);
|
||||
centerA.render(0.0625F);
|
||||
centerB.render(0.0625F);
|
||||
centerC.render(0.0625F);
|
||||
centerD.render(0.0625F);
|
||||
if (corners)
|
||||
{
|
||||
cornerBackLeft.render(0.0625F);
|
||||
cornerBackRight.render(0.0625F);
|
||||
cornerFrontLeft.render(0.0625F);
|
||||
cornerFrontRight.render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void renderMiddle(boolean bottom, boolean corners)
|
||||
{
|
||||
if (bottom)
|
||||
base.render(0.0625F);
|
||||
centerA.render(0.0625F);
|
||||
centerB.render(0.0625F);
|
||||
centerC.render(0.0625F);
|
||||
centerD.render(0.0625F);
|
||||
if (corners)
|
||||
{
|
||||
cornerBackLeft.render(0.0625F);
|
||||
cornerBackRight.render(0.0625F);
|
||||
cornerFrontLeft.render(0.0625F);
|
||||
cornerFrontRight.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderLeft(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
leftBase.render(0.0625F);
|
||||
leftBaseB.render(0.0625F);
|
||||
leftB.render(0.0625F);
|
||||
leftA.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
leftDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
leftDoorB.render(0.0625F);
|
||||
leftDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
leftDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void renderLeft(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
leftBase.render(0.0625F);
|
||||
leftBaseB.render(0.0625F);
|
||||
leftB.render(0.0625F);
|
||||
leftA.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
leftDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
leftDoorB.render(0.0625F);
|
||||
leftDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
leftDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderRight(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
rightBaseB.render(0.0625F);
|
||||
rightBase.render(0.0625F);
|
||||
rightA.render(0.0625F);
|
||||
rightB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
rightDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
rightDoorB.render(0.0625F);
|
||||
rightDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rightDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void renderRight(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
rightBaseB.render(0.0625F);
|
||||
rightBase.render(0.0625F);
|
||||
rightA.render(0.0625F);
|
||||
rightB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
rightDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
rightDoorB.render(0.0625F);
|
||||
rightDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rightDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderBack(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
backBase.render(0.0625F);
|
||||
backBaseB.render(0.0625F);
|
||||
backA.render(0.0625F);
|
||||
backB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
backDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
backDoorB.render(0.0625F);
|
||||
backDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
backDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void renderBack(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
backBase.render(0.0625F);
|
||||
backBaseB.render(0.0625F);
|
||||
backA.render(0.0625F);
|
||||
backB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
backDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
backDoorB.render(0.0625F);
|
||||
backDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
backDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderFront(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
frontBase.render(0.0625F);
|
||||
frontBaseB.render(0.0625F);
|
||||
frontA.render(0.0625F);
|
||||
frontB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
frontDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
frontDoorB.render(0.0625F);
|
||||
frontDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
frontDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
public void renderFront(PipeType type)
|
||||
{
|
||||
if (type != PipeType.MID_CAP)
|
||||
{
|
||||
frontBase.render(0.0625F);
|
||||
frontBaseB.render(0.0625F);
|
||||
frontA.render(0.0625F);
|
||||
frontB.render(0.0625F);
|
||||
if (type == PipeType.CAP || type == PipeType.SOLID)
|
||||
{
|
||||
frontDoorA.render(0.0625F);
|
||||
if (type == PipeType.SOLID)
|
||||
{
|
||||
frontDoorB.render(0.0625F);
|
||||
frontDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
frontDoorC.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public static enum PipeType
|
||||
{
|
||||
/** When there is no connection */
|
||||
MID_CAP,
|
||||
/** Pipe to pipe connection */
|
||||
NORMAL,
|
||||
/** Pipe to wall */
|
||||
CAP,
|
||||
/** No pipe, used only by stone through */
|
||||
SOLID;
|
||||
}
|
||||
public static enum PipeType
|
||||
{
|
||||
/** When there is no connection */
|
||||
MID_CAP,
|
||||
/** Pipe to pipe connection */
|
||||
NORMAL,
|
||||
/** Pipe to wall */
|
||||
CAP,
|
||||
/** No pipe, used only by stone through */
|
||||
SOLID;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import resonantinduction.api.fluid.IFluidPipe;
|
|||
import resonantinduction.core.prefab.part.PartFramedConnection;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.fluid.network.PipeNetwork;
|
||||
import resonantinduction.mechanical.fluid.tank.TileTank;
|
||||
import codechicken.microblock.IHollowConnect;
|
||||
import codechicken.multipart.JIconHitEffects;
|
||||
import codechicken.multipart.JNormalOcclusion;
|
||||
|
@ -204,14 +203,14 @@ public class PartPipe extends PartFramedConnection<EnumPipeMaterial, IFluidPipe,
|
|||
public void save(NBTTagCompound nbt)
|
||||
{
|
||||
super.save(nbt);
|
||||
nbt.setBoolean("isExtracting", isInsulated);
|
||||
nbt.setBoolean("isExtracting", isExtracting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(NBTTagCompound nbt)
|
||||
{
|
||||
super.load(nbt);
|
||||
isExtracting= nbt.getBoolean("isExtracting");
|
||||
isExtracting = nbt.getBoolean("isExtracting");
|
||||
}
|
||||
|
||||
}
|
|
@ -9,9 +9,6 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.mechanical.fluid.prefab.TileFluidNetwork;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
package resonantinduction.mechanical.fluid.pump;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
|
|
@ -59,12 +59,6 @@ public class BlockTank extends BlockFluidNetwork
|
|||
@Override
|
||||
public boolean onMachineActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (world.getBlockTileEntity(x, y, z) instanceof TileTank)
|
||||
{
|
||||
System.out.println(world.isRemote + " Amount: " + ((TileTank) world.getBlockTileEntity(x, y, z)).getInternalTank().getFluidAmount());
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
return FluidUtility.playerActivatedFluidItem(world, x, y, z, entityplayer, side);
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.lwjgl.opengl.GL11;
|
|||
import resonantinduction.core.render.RenderFluidHelper;
|
||||
import resonantinduction.electrical.Electrical;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.fluid.prefab.TileFluidNetwork;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -33,12 +34,12 @@ public class RenderTank extends TileEntitySpecialRenderer
|
|||
{
|
||||
byte renderSides = ((TileTank) tileEntity).renderSides;
|
||||
|
||||
boolean down = TileTank.canRenderSide(renderSides, ForgeDirection.DOWN);
|
||||
boolean up = TileTank.canRenderSide(renderSides, ForgeDirection.UP);
|
||||
boolean north = TileTank.canRenderSide(renderSides, ForgeDirection.NORTH);
|
||||
boolean south = TileTank.canRenderSide(renderSides, ForgeDirection.SOUTH);
|
||||
boolean east = TileTank.canRenderSide(renderSides, ForgeDirection.EAST);
|
||||
boolean west = TileTank.canRenderSide(renderSides, ForgeDirection.WEST);
|
||||
boolean down = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.DOWN);
|
||||
boolean up = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.UP);
|
||||
boolean north = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.NORTH);
|
||||
boolean south = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.SOUTH);
|
||||
boolean east = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.EAST);
|
||||
boolean west = TileFluidNetwork.canRenderSide(renderSides, ForgeDirection.WEST);
|
||||
|
||||
bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glPushMatrix();
|
||||
|
@ -51,7 +52,7 @@ public class RenderTank extends TileEntitySpecialRenderer
|
|||
{
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
|
||||
if (!TileTank.canRenderSide(renderSides, dir))
|
||||
if (!TileFluidNetwork.canRenderSide(renderSides, dir))
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.99f, 0.99f, 0.99f);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class TankNetwork extends FluidNetwork
|
|||
{
|
||||
if (part instanceof IFluidConnector && ((TileEntity) part).yCoord == y)
|
||||
{
|
||||
parts.add((IFluidConnector) part);
|
||||
parts.add(part);
|
||||
}
|
||||
}
|
||||
if (!parts.isEmpty())
|
||||
|
|
|
@ -32,7 +32,7 @@ public class TileTank extends TileFluidNetwork
|
|||
{
|
||||
if (network instanceof TankNetwork)
|
||||
{
|
||||
this.network = (TankNetwork) network;
|
||||
this.network = network;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class PartGear extends PartMechanical implements IMechanicalConnector
|
|||
@Override
|
||||
public boolean activate(EntityPlayer player, MovingObjectPosition hit, ItemStack item)
|
||||
{
|
||||
System.out.println(world().isRemote + ": " + getNetwork());
|
||||
// System.out.println(world().isRemote + ": " + getNetwork());
|
||||
if (player.isSneaking())
|
||||
{
|
||||
this.manualCrankTime = 20;
|
||||
|
|
|
@ -19,55 +19,55 @@ import calclavia.lib.utility.FluidUtility;
|
|||
|
||||
public class ItemPipeGauge extends ItemBase
|
||||
{
|
||||
Icon pipeGuage;
|
||||
Icon pipeGuage;
|
||||
|
||||
public ItemPipeGauge()
|
||||
{
|
||||
super("PipeGuage");
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(CreativeTabs.tabTools);
|
||||
this.setMaxStackSize(1);
|
||||
this.setTextureName(Reference.PREFIX + "readout.PipeGauge");
|
||||
public ItemPipeGauge()
|
||||
{
|
||||
super("PipeGuage");
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(CreativeTabs.tabTools);
|
||||
this.setMaxStackSize(1);
|
||||
this.setTextureName(Reference.PREFIX + "readout.PipeGauge");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
ForgeDirection hitSide = ForgeDirection.getOrientation(side);
|
||||
if (tileEntity instanceof IReadOut)
|
||||
{
|
||||
String output = ((IReadOut) tileEntity).getMeterReading(player, hitSide, EnumTools.PIPE_GUAGE);
|
||||
if (output != null && !output.isEmpty())
|
||||
{
|
||||
if (output.length() > 100)
|
||||
{
|
||||
output = output.substring(0, 100);
|
||||
}
|
||||
output.trim();
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("ReadOut> " + output));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (tileEntity instanceof IFluidHandler)
|
||||
{
|
||||
FluidTankInfo[] tanks = ((IFluidHandler) tileEntity).getTankInfo(ForgeDirection.getOrientation(side));
|
||||
if (tanks != null)
|
||||
{
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("FluidHandler> Side:" + hitSide.toString() + " Tanks:" + tanks.length));
|
||||
for (FluidStack stack : FluidUtility.getFluidList(tanks))
|
||||
{
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("Fluid>" + stack.amount + "mb of " + stack.getFluid().getName()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
ForgeDirection hitSide = ForgeDirection.getOrientation(side);
|
||||
if (tileEntity instanceof IReadOut)
|
||||
{
|
||||
String output = ((IReadOut) tileEntity).getMeterReading(player, hitSide, EnumTools.PIPE_GUAGE);
|
||||
if (output != null && !output.isEmpty())
|
||||
{
|
||||
if (output.length() > 100)
|
||||
{
|
||||
output = output.substring(0, 100);
|
||||
}
|
||||
output.trim();
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("ReadOut> " + output));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (tileEntity instanceof IFluidHandler)
|
||||
{
|
||||
FluidTankInfo[] tanks = ((IFluidHandler) tileEntity).getTankInfo(ForgeDirection.getOrientation(side));
|
||||
if (tanks != null)
|
||||
{
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("FluidHandler> Side:" + hitSide.toString() + " Tanks:" + tanks.length));
|
||||
for (FluidStack stack : FluidUtility.getFluidList(tanks))
|
||||
{
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("Fluid>" + stack.amount + "mb of " + stack.getFluid().getName()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockImprintable;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.util.ChatMessageComponent;
|
|||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.prefab.block.BlockImprintable;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.world.World;
|
|||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.prefab.block.BlockImprintable;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import universalelectricity.api.UniversalElectricity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ import calclavia.lib.network.IPacketReceiverWithID;
|
|||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
/** @author Darkguardsman */
|
||||
public class TileRejector extends TileEntityFilterable implements IPacketReceiverWithID
|
||||
{
|
||||
|
@ -74,7 +72,7 @@ public class TileRejector extends TileEntityFilterable implements IPacketReceive
|
|||
entity.posX += side.offsetX;
|
||||
// entity.motionY += 0.10000000298023224D;
|
||||
entity.posZ += side.offsetZ;
|
||||
|
||||
|
||||
if (!this.worldObj.isRemote && tileEntity instanceof IBelt)
|
||||
{
|
||||
((IBelt) tileEntity).ignoreEntity(entity);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.mechanical.network;
|
||||
|
||||
import universalelectricity.api.net.IConnectable;
|
||||
import universalelectricity.api.net.IConnector;
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,6 +33,7 @@ public interface IMechanicalNetwork extends INetwork<IMechanicalNetwork, IMechan
|
|||
public float getPrevAngularVelocity();
|
||||
|
||||
/** Called to rebuild the network */
|
||||
@Override
|
||||
public void reconstruct();
|
||||
|
||||
public long onReceiveEnergy(long torque, float angularVelocity);
|
||||
|
|
|
@ -359,7 +359,7 @@ public class MechanicalNetwork extends Network<IMechanicalNetwork, IMechanicalCo
|
|||
|
||||
if (deltaTime > 1)
|
||||
{
|
||||
rotation = (float) (((angularVelocity) * ((float) deltaTime / 1000f) + rotation) % Math.PI);
|
||||
rotation = (float) (((angularVelocity) * (deltaTime / 1000f) + rotation) % Math.PI);
|
||||
lastRotateTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,11 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import resonantinduction.mechanical.network.IMechanicalConnector;
|
||||
import resonantinduction.mechanical.network.IMechanicalNetwork;
|
||||
import resonantinduction.mechanical.network.MechanicalNetwork;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
|
@ -27,8 +21,6 @@ import codechicken.multipart.JNormalOcclusion;
|
|||
import codechicken.multipart.TFacePart;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* We assume all the force acting on the gear is 90 degrees.
|
||||
|
@ -269,17 +261,18 @@ public abstract class PartMechanical extends JCuboidPart implements JNormalOcclu
|
|||
{
|
||||
if (isPositive)
|
||||
{
|
||||
((PartMechanical) neighbor).setClockwise(isClockwise);
|
||||
neighbor.setClockwise(isClockwise);
|
||||
}
|
||||
else
|
||||
{
|
||||
((PartMechanical) neighbor).setClockwise(!isClockwise);
|
||||
neighbor.setClockwise(!isClockwise);
|
||||
}
|
||||
|
||||
neighbor.markRotationUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long onReceiveEnergy(ForgeDirection from, long torque, float angularVelocity, boolean doReceive)
|
||||
{
|
||||
if (!world().isRemote && doReceive)
|
||||
|
@ -367,6 +360,15 @@ public abstract class PartMechanical extends JCuboidPart implements JNormalOcclu
|
|||
@Override
|
||||
public void setClockwise(boolean isClockwise)
|
||||
{
|
||||
if (this.isClockwise != isClockwise)
|
||||
{
|
||||
if (getNetwork().getPower() > 0)
|
||||
{
|
||||
getNetwork().setPower(0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.isClockwise = isClockwise;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package resonantinduction.mechanical.process;
|
||||
|
||||
import calclavia.lib.render.block.BlockRenderingHandler;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
|
|
@ -2,7 +2,6 @@ package resonantinduction.mechanical.process;
|
|||
|
||||
import java.util.HashMap;
|
||||
|
||||
import calclavia.lib.prefab.tile.IRotatable;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -15,6 +14,7 @@ import resonantinduction.core.Reference;
|
|||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.mechanical.network.TileMechanical;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.prefab.tile.IRotatable;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class TileGrinderWheel extends TileMechanical implements IRotatable
|
|||
{
|
||||
return !(getBlockMetadata() % 2 == 0);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package resonantinduction.mechanical.trait;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import resonantinduction.mechanical.network.IMechanical;
|
||||
import resonantinduction.mechanical.network.IMechanicalConnector;
|
||||
import resonantinduction.mechanical.network.IMechanicalNetwork;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
@ -123,6 +122,6 @@ public class TraitMechanicalConnector extends TileMultipart implements IMechanic
|
|||
@Override
|
||||
public void setClockwise(boolean isClockwise)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue