Half-implemented Solar Neutron Activator

This commit is contained in:
Aidan C. Brady 2015-02-25 11:11:30 -05:00
parent a38090a521
commit 999502a053
13 changed files with 705 additions and 269 deletions

View file

@ -48,9 +48,9 @@ import mekanism.client.gui.GuiRobitMain;
import mekanism.client.gui.GuiRobitRepair;
import mekanism.client.gui.GuiRobitSmelting;
import mekanism.client.gui.GuiRotaryCondensentrator;
import mekanism.client.gui.GuiSolarEvaporationController;
import mekanism.client.gui.GuiSeismicReader;
import mekanism.client.gui.GuiSeismicVibrator;
import mekanism.client.gui.GuiSolarEvaporationController;
import mekanism.client.gui.GuiTeleporter;
import mekanism.client.gui.GuiUpgradeManagement;
import mekanism.client.render.MekanismRenderer;
@ -93,6 +93,7 @@ import mekanism.client.render.tileentity.RenderPressurizedReactionChamber;
import mekanism.client.render.tileentity.RenderRotaryCondensentrator;
import mekanism.client.render.tileentity.RenderSalinationController;
import mekanism.client.render.tileentity.RenderSeismicVibrator;
import mekanism.client.render.tileentity.RenderSolarNeutronActivator;
import mekanism.client.render.tileentity.RenderTeleporter;
import mekanism.common.CommonProxy;
import mekanism.common.Mekanism;
@ -137,7 +138,6 @@ import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityEntangledBlock;
import mekanism.common.tile.TileEntityFactory;
import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityGasCentrifuge;
import mekanism.common.tile.TileEntityGasTank;
import mekanism.common.tile.TileEntityLaser;
import mekanism.common.tile.TileEntityLaserAmplifier;
@ -152,10 +152,10 @@ import mekanism.common.tile.TileEntityPortableTank;
import mekanism.common.tile.TileEntityPrecisionSawmill;
import mekanism.common.tile.TileEntityPurificationChamber;
import mekanism.common.tile.TileEntityRotaryCondensentrator;
import mekanism.common.tile.TileEntitySolarEvaporationController;
import mekanism.common.tile.TileEntitySeismicVibrator;
import mekanism.common.tile.TileEntitySolarEvaporationController;
import mekanism.common.tile.TileEntitySolarNeutronActivator;
import mekanism.common.tile.TileEntityTeleporter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.entity.RenderSkeleton;
@ -315,8 +315,8 @@ public class ClientProxy extends CommonProxy
ClientRegistry.registerTileEntity(TileEntityLaser.class, "Laser", new RenderLaser());
ClientRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier", new RenderLaserAmplifier());
ClientRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam", new RenderLaserTractorBeam());
ClientRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator", new RenderSolarNeutronActivator());
GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator");
GameRegistry.registerTileEntity(TileEntityGasCentrifuge.class, "GasCentrifuge");
}
@Override
@ -482,9 +482,9 @@ public class ClientProxy extends CommonProxy
case 45:
return new GuiLaserTractorBeam(player.inventory, (TileEntityLaserTractorBeam)tileEntity);
case 46:
return new GuiAmbientAccumulator(player, (TileEntityAmbientAccumulator)tileEntity);
case 47:
return new GuiEntangledBlock(player.inventory, (TileEntityEntangledBlock)tileEntity);
case 47:
return new GuiAmbientAccumulator(player, (TileEntityAmbientAccumulator)tileEntity);
}
return null;

View file

@ -41,6 +41,7 @@ public class CTMRenderingHandler implements ISimpleBlockRenderingHandler
TileEntityBasicBlock tile = (TileEntityBasicBlock)world.getTileEntity(x, y, z);
blockCTM.setFacing(tile.facing);
}
rendererCTM.blockAccess = world;
rendererCTM.renderMaxX = 1.0;
rendererCTM.renderMaxY = 1.0;
@ -66,5 +67,4 @@ public class CTMRenderingHandler implements ISimpleBlockRenderingHandler
{
return ClientProxy.CTM_RENDER_ID;
}
}

View file

@ -22,17 +22,20 @@ import mekanism.client.render.MekanismRenderer;
import mekanism.common.block.BlockMachine.MachineType;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
{
@ -53,6 +56,8 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
public ModelFluidicPlenisher fluidicPlenisher = new ModelFluidicPlenisher();
public ModelLaser laser = new ModelLaser();
public ModelLaserAmplifier laserAmplifier = new ModelLaserAmplifier();
public IModelCustom solarNeutronActivator = AdvancedModelLoader.loadModel(new ResourceLocation("mekanism:models/solar_tri.obj"));
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
@ -211,6 +216,14 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LaserTractorBeam.png"));
laserAmplifier.render(0.0560F);
}
else if(type == MachineType.SOLAR_NEUTRON_ACTIVATOR)
{
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(0.45F, 0.45F, 0.45F);
GL11.glTranslatef(0.0F, -1.3F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SolarNeutronActivator.png"));
solarNeutronActivator.renderAll();
}
else {
MekanismRenderer.renderItem(renderer, metadata, block);
}

View file

@ -0,0 +1,51 @@
package mekanism.client.render.tileentity;
import mekanism.common.tile.TileEntitySolarNeutronActivator;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
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;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderSolarNeutronActivator extends TileEntitySpecialRenderer
{
private IModelCustom model;
public RenderSolarNeutronActivator()
{
model = AdvancedModelLoader.loadModel(new ResourceLocation("mekanism:models/solar_tri.obj"));
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
{
renderAModelAt((TileEntitySolarNeutronActivator)tileEntity, x, y, z, partialTick);
}
private void renderAModelAt(TileEntitySolarNeutronActivator tileEntity, double x, double y, double z, float partialTick)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x+0.5F, (float)y, (float)z+0.5F);
GL11.glScalef(0.5F, 0.5F, 0.5F);
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SolarNeutronActivator.png"));
switch(tileEntity.facing)
{
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
}
model.renderAll();
GL11.glPopMatrix();
}
}

View file

@ -40,8 +40,8 @@ import mekanism.common.inventory.container.ContainerRobitMain;
import mekanism.common.inventory.container.ContainerRobitRepair;
import mekanism.common.inventory.container.ContainerRobitSmelting;
import mekanism.common.inventory.container.ContainerRotaryCondensentrator;
import mekanism.common.inventory.container.ContainerSolarEvaporationController;
import mekanism.common.inventory.container.ContainerSeismicVibrator;
import mekanism.common.inventory.container.ContainerSolarEvaporationController;
import mekanism.common.inventory.container.ContainerTeleporter;
import mekanism.common.inventory.container.ContainerUpgradeManagement;
import mekanism.common.tile.TileEntityAdvancedElectricMachine;
@ -72,7 +72,6 @@ import mekanism.common.tile.TileEntityEnergyCube;
import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityFactory;
import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityGasCentrifuge;
import mekanism.common.tile.TileEntityGasTank;
import mekanism.common.tile.TileEntityLaser;
import mekanism.common.tile.TileEntityLaserAmplifier;
@ -87,10 +86,10 @@ import mekanism.common.tile.TileEntityPortableTank;
import mekanism.common.tile.TileEntityPrecisionSawmill;
import mekanism.common.tile.TileEntityPurificationChamber;
import mekanism.common.tile.TileEntityRotaryCondensentrator;
import mekanism.common.tile.TileEntitySolarEvaporationController;
import mekanism.common.tile.TileEntitySeismicVibrator;
import mekanism.common.tile.TileEntitySolarEvaporationController;
import mekanism.common.tile.TileEntitySolarNeutronActivator;
import mekanism.common.tile.TileEntityTeleporter;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
@ -155,8 +154,8 @@ public class CommonProxy
GameRegistry.registerTileEntity(TileEntityLaser.class, "Laser");
GameRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier");
GameRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam");
GameRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator");
GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator");
GameRegistry.registerTileEntity(TileEntityGasCentrifuge.class, "GasCentrifuge");
}
/**

View file

@ -53,7 +53,6 @@ import mekanism.common.tile.TileEntityEnrichmentChamber;
import mekanism.common.tile.TileEntityEntangledBlock;
import mekanism.common.tile.TileEntityFactory;
import mekanism.common.tile.TileEntityFluidicPlenisher;
import mekanism.common.tile.TileEntityGasCentrifuge;
import mekanism.common.tile.TileEntityLaser;
import mekanism.common.tile.TileEntityLaserAmplifier;
import mekanism.common.tile.TileEntityLaserTractorBeam;
@ -66,9 +65,9 @@ import mekanism.common.tile.TileEntityPrecisionSawmill;
import mekanism.common.tile.TileEntityPurificationChamber;
import mekanism.common.tile.TileEntityRotaryCondensentrator;
import mekanism.common.tile.TileEntitySeismicVibrator;
import mekanism.common.tile.TileEntitySolarNeutronActivator;
import mekanism.common.tile.TileEntityTeleporter;
import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@ -94,13 +93,12 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import buildcraft.api.tools.IToolWrench;
import cpw.mods.fml.common.ModAPIManager;
import cpw.mods.fml.common.Optional.Interface;
import cpw.mods.fml.common.Optional.Method;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.api.tools.IToolWrench;
import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.peripheral.IPeripheralProvider;
@ -139,7 +137,8 @@ import dan200.computercraft.api.peripheral.IPeripheralProvider;
* 1:14: Laser Amplifier
* 1:15: Laser Tractor Beam
* 2:0: Entangled Block
* 2:1: Ambient Accumulator
* 2:1: Solar Neutron Activator
* 2:2: Ambient Accumulator
* @author AidanBrady
*
*/
@ -205,8 +204,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
break;
case MACHINE_BLOCK_3:
icons[0][0] = register.registerIcon("mekanism:AmbientAccumulator");
icons[1][0] = register.registerIcon("mekanism:SteelCasing");
icons[2][0] = register.registerIcon("mekanism:GasCentrifuge");
icons[2][0] = register.registerIcon("mekanism:SteelCasing");
break;
}
@ -559,7 +557,9 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
}
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && tool instanceof IToolWrench)
{
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
}
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][tileEntity.facing];
@ -600,11 +600,12 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
if(electricChest.canAccess())
{
MekanismUtils.openElectricChestGui((EntityPlayerMP)entityplayer, electricChest, null, true);
} else if(!electricChest.authenticated)
}
else if(!electricChest.authenticated)
{
Mekanism.packetHandler.sendTo(new ElectricChestMessage(ElectricChestPacketType.CLIENT_OPEN, true, false, 2, 0, null, Coord4D.get(electricChest)), (EntityPlayerMP)entityplayer);
} else
{
}
else {
Mekanism.packetHandler.sendTo(new ElectricChestMessage(ElectricChestPacketType.CLIENT_OPEN, true, false, 1, 0, null, Coord4D.get(electricChest)), (EntityPlayerMP)entityplayer);
}
@ -619,10 +620,11 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
entityplayer.inventory.markDirty();
return true;
}
} else
{
}
else {
entityplayer.openGui(Mekanism.instance, type.guiId, world, x, y, z);
}
return true;
case LOGISTICAL_SORTER:
LogisticalSorterGuiMessage.openServerGui(SorterGuiPacket.SERVER, 0, world, (EntityPlayerMP)entityplayer, Coord4D.get(tileEntity), -1);
@ -633,6 +635,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
entityplayer.openGui(Mekanism.instance, type.guiId, world, x, y, z);
return true;
}
return false;
}
}
@ -1061,9 +1064,9 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
LASER(MachineBlock.MACHINE_BLOCK_2, 13, "Laser", -1, TileEntityLaser.class, true, true, false),
LASER_AMPLIFIER(MachineBlock.MACHINE_BLOCK_2, 14, "LaserAmplifier", 44, TileEntityLaserAmplifier.class, false, true, false),
LASER_TRACTOR_BEAM(MachineBlock.MACHINE_BLOCK_2, 15, "LaserTractorBeam", 45, TileEntityLaserTractorBeam.class, false, true, false),
AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 0, "AmbientAccumulator", 46, TileEntityAmbientAccumulator.class, true, false, false),
ENTANGLED_BLOCK(MachineBlock.MACHINE_BLOCK_3, 1, "EntangledBlock", 47, TileEntityEntangledBlock.class, true, false, false),
GAS_CENTRIFUGE(MachineBlock.MACHINE_BLOCK_3, 2, "GasCentrifuge", 48, TileEntityGasCentrifuge.class, true, false, false);
ENTANGLED_BLOCK(MachineBlock.MACHINE_BLOCK_3, 0, "EntangledBlock", 47, TileEntityEntangledBlock.class, true, false, false),
SOLAR_NEUTRON_ACTIVATOR(MachineBlock.MACHINE_BLOCK_3, 1, "SolarNeutronActivator", -1/*48*/, TileEntitySolarNeutronActivator.class, false, true, false),
AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 2, "AmbientAccumulator", 46, TileEntityAmbientAccumulator.class, true, false, false);
public MachineBlock typeBlock;
public int meta;
@ -1190,12 +1193,12 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
return 0;
case LASER_TRACTOR_BEAM:
return 0;
case AMBIENT_ACCUMULATOR:
return 0;
case ENTANGLED_BLOCK:
return 0;
case GAS_CENTRIFUGE:
return 100;
case SOLAR_NEUTRON_ACTIVATOR:
return 0;
case AMBIENT_ACCUMULATOR:
return 0;
default:
return 0;
}

View file

@ -100,6 +100,10 @@ import ic2.api.item.ISpecialElectricItem;
* 1:12: Fluidic Plenisher
* 1:13: Laser
* 1:14: Laser Amplifier
* 1:15: Laser Tractor Beam
* 2:0: Entangled Block
* 2:1: Solar Neutron Activator
* 2:2: Ambient Accumulator
* @author AidanBrady
*
*/

View file

@ -88,11 +88,12 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
{
data.add(collectedGas.getGasType().getID());
data.add(collectedGas.getStored());
} else
{
}
else {
data.add(-1);
data.add(0);
}
return data;
}
@ -100,11 +101,12 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
public void handlePacketData(ByteBuf data)
{
int gasID = data.readInt();
if(gasID < 0)
{
collectedGas.setGas(null);
} else
{
}
else {
collectedGas.setGas(new GasStack(gasID, data.readInt()));
}
}

View file

@ -1,230 +0,0 @@
package mekanism.common.tile;
import java.util.ArrayList;
import mekanism.api.Coord4D;
import mekanism.api.MekanismConfig.usage;
import mekanism.api.Range4D;
import mekanism.api.gas.Gas;
import mekanism.api.gas.GasStack;
import mekanism.api.gas.GasTank;
import mekanism.api.gas.GasTransmission;
import mekanism.api.gas.IGasHandler;
import mekanism.api.gas.ITubeConnection;
import mekanism.common.Mekanism;
import mekanism.common.base.IRedstoneControl.RedstoneControl;
import mekanism.common.block.BlockMachine.MachineType;
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
import mekanism.common.recipe.RecipeHandler;
import mekanism.common.recipe.inputs.GasInput;
import mekanism.common.recipe.machines.GasCentrifugeRecipe;
import mekanism.common.util.ChargeUtils;
import mekanism.common.util.MekanismUtils;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityGasCentrifuge extends TileEntityNoisyElectricBlock implements IGasHandler, ITubeConnection
{
public GasTank inputTank = new GasTank(MAX_GAS);
public GasTank outputTank = new GasTank(MAX_GAS);
public static final int MAX_GAS = 10000;
public int updateDelay;
public int gasOutput = 16;
public boolean isActive;
public boolean clientActive;
public double prevEnergy;
public double energyUsage = usage.gasCentrifugeUsage;
public GasCentrifugeRecipe cachedRecipe;
public RedstoneControl controlType = RedstoneControl.DISABLED;
public TileEntityGasCentrifuge()
{
super("machine.centrifuge", "GasCentrifuge", MachineType.GAS_CENTRIFUGE.baseEnergy);
inventory = new ItemStack[3];
}
@Override
public void onUpdate()
{
if(worldObj.isRemote && updateDelay > 0)
{
updateDelay--;
if(updateDelay == 0 && clientActive != isActive)
{
isActive = clientActive;
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
}
}
if(!worldObj.isRemote)
{
GasCentrifugeRecipe recipe = getRecipe();
if(updateDelay > 0)
{
updateDelay--;
if(updateDelay == 0 && clientActive != isActive)
{
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
}
}
ChargeUtils.discharge(1, this);
if(inventory[2] != null && inputTank.getGas() != null)
{
inputTank.draw(GasTransmission.addGas(inventory[2], inputTank.getGas()), true);
}
if(canOperate(recipe) && getEnergy() >= energyUsage && MekanismUtils.canFunction(this))
{
setActive(true);
setEnergy(getEnergy() - energyUsage);
operate(recipe);
markDirty();
}
else {
if(prevEnergy >= getEnergy())
{
setActive(false);
}
}
prevEnergy = getEnergy();
if(outputTank.getGas() != null)
{
GasStack toSend = new GasStack(outputTank.getGas().getGas(), Math.min(outputTank.getStored(), gasOutput));
for(ForgeDirection side : new ForgeDirection[]{ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.WEST, ForgeDirection.EAST})
{
TileEntity tileEntity = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
if(tileEntity instanceof IGasHandler)
{
if(((IGasHandler)tileEntity).canReceiveGas(side.getOpposite(), outputTank.getGas().getGas()))
{
outputTank.draw(((IGasHandler)tileEntity).receiveGas(side.getOpposite(), toSend, true), true);
break;
}
}
}
}
}
}
public GasCentrifugeRecipe getRecipe()
{
GasInput input = getInput();
if(cachedRecipe == null || !input.testEquality(cachedRecipe.getInput()))
{
cachedRecipe = RecipeHandler.getCentrifugeRecipe(getInput());
}
return cachedRecipe;
}
public GasInput getInput()
{
return new GasInput(inputTank.getGas());
}
public boolean canOperate(GasCentrifugeRecipe recipe)
{
return recipe != null && recipe.canOperate(inputTank, outputTank);
}
public void operate(GasCentrifugeRecipe recipe)
{
recipe.operate(inputTank, outputTank);
}
@Override
public void setActive(boolean active)
{
isActive = active;
if(clientActive != active && updateDelay == 0)
{
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
updateDelay = 10;
clientActive = active;
}
}
@Override
public boolean getActive()
{
return isActive;
}
@Override
public boolean renderUpdate()
{
return false;
}
@Override
public boolean lightUpdate()
{
return false;
}
public GasTank getTank(ForgeDirection side)
{
return side == ForgeDirection.UP ? inputTank : outputTank;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
{
if(canReceiveGas(side, stack != null ? stack.getGas() : null))
{
return getTank(side).receive(stack, doTransfer);
}
return 0;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
if(canDrawGas(side, null))
{
return getTank(side).draw(amount, doTransfer);
}
return null;
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{
return getTank(side) == outputTank ? getTank(side).canDraw(type) : false;
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{
return getTank(side) != null && getTank(side) != outputTank ? getTank(side).canReceive(type) : false;
}
@Override
public boolean canTubeConnect(ForgeDirection side)
{
return side != ForgeDirection.DOWN;
}
}

View file

@ -0,0 +1,81 @@
package mekanism.common.tile;
import mekanism.api.Coord4D;
import mekanism.api.gas.Gas;
import mekanism.api.gas.GasStack;
import mekanism.api.gas.IGasHandler;
import mekanism.api.gas.ITubeConnection;
import mekanism.common.base.IBoundingBlock;
import mekanism.common.base.ISustainedData;
import mekanism.common.util.MekanismUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock implements IBoundingBlock, IGasHandler, ITubeConnection, ISustainedData
{
public TileEntitySolarNeutronActivator()
{
super("SolarNeutronActivator");
}
@Override
public void onUpdate()
{
}
@Override
public void onPlace()
{
MekanismUtils.makeBoundingBlock(worldObj, xCoord, yCoord+1, zCoord, Coord4D.get(this));
}
@Override
public void onBreak()
{
worldObj.setBlockToAir(xCoord, yCoord+1, zCoord);
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
{
return 0;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{
return false;
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{
return false;
}
@Override
public boolean canTubeConnect(ForgeDirection side)
{
return side == ForgeDirection.getOrientation(facing) || side == ForgeDirection.DOWN;
}
@Override
public void writeSustainedData(ItemStack itemStack)
{
}
@Override
public void readSustainedData(ItemStack itemStack)
{
}
}

View file

@ -0,0 +1,513 @@
# Blender v2.70 (sub 0) OBJ File: 'untitled.blend'
# www.blender.org
o Cube
v 0.775751 0.000000 -0.775751
v 0.775751 0.000000 0.775751
v -0.775751 0.000000 0.775751
v 0.600098 1.245471 -0.600098
v 0.600098 1.245471 0.600099
v -0.600098 1.245471 0.600098
v -0.600098 1.245471 -0.600098
v -0.775751 0.000000 -0.775751
v -1.000000 2.000000 -1.000000
v -0.400000 0.003810 -0.200000
v -0.597037 0.003810 -1.000000
v 0.597037 0.003810 -1.000000
v 0.400000 0.003810 -0.200000
v -0.210455 1.400000 -0.200000
v -0.400000 1.400000 -1.000000
v 0.400000 1.400000 -1.000000
v 0.210455 1.400000 -0.200000
v -0.163734 0.001860 0.929790
v -0.163734 0.001860 0.602323
v 0.163734 0.001860 0.602323
v 0.163734 0.001860 0.929790
v -0.163734 1.681595 0.929790
v -0.163734 1.681595 0.602323
v 0.163734 1.681595 0.602323
v 0.163734 1.681595 0.929790
v -0.163734 2.317753 0.908083
v -0.163734 2.154813 0.624031
v 0.163734 2.154813 0.624031
v 0.163734 2.317753 0.908083
v -0.163734 2.494844 0.723671
v -0.163734 2.332132 0.542139
v 0.163734 2.332132 0.542139
v 0.163734 2.494844 0.723671
v -0.163734 2.557197 0.442637
v -0.163734 2.438710 0.421698
v 0.163734 2.438710 0.421698
v 0.163734 2.557197 0.442637
v -0.163734 2.705466 -0.790486
v -0.163734 2.586978 -0.811424
v 0.163734 2.586978 -0.811424
v 0.163734 2.705466 -0.790486
v -0.724969 2.724604 0.442637
v -0.724969 2.606117 0.421698
v 0.724969 2.606117 0.421698
v 0.724969 2.724604 0.442637
v -0.724969 2.872873 -0.790486
v -0.724969 2.754385 -0.811424
v 0.724969 2.754385 -0.811424
v 0.724969 2.872873 -0.790486
v -0.208086 1.400000 -0.391914
v -0.208086 1.400000 -0.808086
v 0.208086 1.400000 -0.808086
v 0.208086 1.400000 -0.391914
v -0.150252 1.687980 -0.469609
v -0.150252 1.837299 -0.730391
v 0.150252 1.837299 -0.730391
v 0.150252 1.687980 -0.469609
v -0.079605 1.697107 -0.540204
v -0.079605 1.776218 -0.678369
v 0.079605 1.776218 -0.678369
v 0.079605 1.697107 -0.540204
v 0.444352 2.499090 0.421698
v 0.444352 2.647359 -0.811424
v 0.444352 2.765847 -0.790486
v 0.444352 2.617578 0.442637
v -0.444352 2.647359 -0.811424
v -0.444352 2.499090 0.421698
v -0.444352 2.617578 0.442637
v -0.444352 2.765847 -0.790486
v -0.163734 2.599183 -0.359366
v 0.163734 2.599183 -0.359366
v 0.163734 2.480696 -0.380305
v -0.163734 2.480696 -0.380305
v -0.724969 2.766590 -0.359366
v 0.724969 2.766590 -0.359366
v 0.724969 2.648103 -0.380305
v -0.724969 2.648103 -0.380305
v 0.444352 2.541076 -0.380305
v 0.444352 2.659564 -0.359366
v -0.444352 2.541076 -0.380305
v -0.444352 2.659564 -0.359366
vt 0.250000 0.851562
vt 0.250000 0.656250
vt 0.437500 0.656250
vt 0.695312 0.046875
vt 0.656250 0.250000
vt 0.460938 0.250000
vt 0.445312 0.453125
vt 0.406250 0.656250
vt 0.218750 0.656250
vt 0.195312 0.250000
vt 0.195312 0.000000
vt 0.445312 0.000000
vt 0.468750 0.250000
vt 0.664062 0.250000
vt 0.695312 0.453125
vt 0.828125 0.250000
vt 0.695312 0.250000
vt 0.695312 0.015625
vt 0.031250 0.226562
vt 0.000000 0.000000
vt 0.187500 0.000000
vt 0.554688 0.890625
vt 0.554688 0.664062
vt 0.687500 0.664062
vt 0.718750 0.921875
vt 0.687500 0.703125
vt 0.820312 0.703125
vt 0.695312 0.328125
vt 0.882812 0.328125
vt 0.851562 0.453125
vt 0.054688 0.351562
vt 0.062500 0.312500
vt 0.132812 0.312500
vt 0.140625 0.625000
vt 0.132812 0.359375
vt 0.179688 0.359375
vt 0.945312 0.781250
vt 0.945312 0.507812
vt 1.000000 0.507812
vt 0.007812 0.625000
vt 0.023438 0.359375
vt 0.078125 0.359375
vt 0.890625 0.726562
vt 0.890625 0.453125
vt 0.945312 0.453125
vt 1.000000 0.453125
vt 0.945312 0.726562
vt 0.945312 0.828125
vt 0.890625 0.828125
vt 0.945312 0.867188
vt 0.890625 0.867188
vt 0.054688 0.632812
vt 0.046875 0.703125
vt 0.000000 0.726562
vt 1.000000 0.781250
vt 1.000000 0.851562
vt 0.945312 0.851562
vt 0.187500 0.625000
vt 0.187500 0.726562
vt 0.945312 0.914062
vt 0.890625 0.914062
vt 0.062500 0.734375
vt 0.031250 0.757812
vt 1.000000 0.882812
vt 0.945312 0.882812
vt 0.140625 0.703125
vt 0.164062 0.757812
vt 0.593750 0.585938
vt 0.593750 0.656250
vt 0.539062 0.656250
vt 0.078125 0.750000
vt 1.000000 0.914062
vt 0.117188 0.773438
vt 0.117188 0.750000
vt 0.585938 0.046875
vt 0.531250 0.046875
vt 0.531250 0.031250
vt 0.820312 0.648438
vt 0.890625 0.648438
vt 0.890625 0.695312
vt 0.820312 0.546875
vt 0.890625 0.546875
vt 0.890625 0.601562
vt 0.687500 0.500000
vt 0.687500 0.453125
vt 0.820312 0.453125
vt 0.132812 0.820312
vt 0.203125 0.828125
vt 0.203125 0.851562
vt 0.125000 0.820312
vt 0.125000 0.796875
vt 0.203125 0.796875
vt 0.640625 0.453125
vt 0.687500 0.460938
vt 0.687500 0.585938
vt 0.492188 0.585938
vt 0.492188 0.656250
vt 0.445312 0.656250
vt 0.632812 0.039062
vt 0.632812 0.015625
vt 0.679688 0.000000
vt 0.484375 0.039062
vt 0.445312 0.023438
vt 0.820312 0.296875
vt 0.867188 0.296875
vt 0.867188 0.320312
vt 0.507812 0.828125
vt 0.500000 0.851562
vt 0.453125 0.851562
vt 0.546875 0.710938
vt 0.492188 0.710938
vt 0.062500 0.257812
vt 0.156250 0.226562
vt 0.132812 0.257812
vt 0.132812 0.351562
vt 0.531250 0.718750
vt 0.507812 0.718750
vt 0.882812 0.703125
vt 0.875000 0.773438
vt 0.554688 0.750000
vt 0.546875 0.820312
vt 0.492188 0.820312
vt 0.742188 0.265625
vt 0.765625 0.304688
vt 0.531250 0.742188
vt 0.507812 0.742188
vt 0.859375 0.773438
vt 0.835938 0.765625
vt 0.531250 0.828125
vt 0.757812 0.265625
vt 0.820312 0.601562
vt 0.593750 0.453125
vt 0.640625 0.585938
vt 0.585938 0.031250
vt 0.773438 0.296875
vt 0.820312 0.312500
vt 0.687500 0.546875
vt 0.820312 0.500000
vt 0.539062 0.585938
vt 0.484375 0.015625
vt 0.554688 0.835938
vt 0.546875 0.859375
vt 0.539062 0.453125
vt 0.687500 0.648438
vt 0.820312 0.695312
vt 0.000000 0.835938
vt 0.000000 0.820312
vt 0.000000 0.773438
vt 0.687500 0.656250
vt 0.492188 0.453125
vt 0.445312 0.585938
vt 0.687500 0.601562
vt 0.640625 0.656250
vt 0.890625 0.500000
vt 0.406250 0.250000
vt 0.195312 0.453125
vt 0.437500 0.851562
vt 0.445312 0.046875
vt 0.445312 0.250000
vt 0.828125 0.023438
vt 0.687500 0.890625
vt 0.789062 0.921875
vt 0.726562 0.453125
vt 0.132812 0.734375
vt 0.070312 0.773438
vt 0.132812 0.835938
vt 0.195312 0.820312
vt 0.679688 0.023438
vt 0.460938 0.828125
vt 0.484375 0.664062
vt 0.828125 0.750000
vt 0.484375 0.750000
vt 0.695312 0.320312
vt 0.765625 0.289062
vt 0.773438 0.320312
vt 0.687500 0.695312
vt 0.000000 0.789062
vt 0.445312 0.460938
vt 0.218750 0.250000
vn 0.000000 1.000000 0.000000
vn 0.990201 0.139651 0.000001
vn -0.000001 0.139651 0.990201
vn 0.000000 -1.000000 0.000000
vn -0.990201 0.139651 -0.000000
vn -0.964014 0.136046 0.228405
vn 0.000000 0.000000 -1.000000
vn 0.962655 0.130689 0.237099
vn 0.000000 0.000000 1.000000
vn 0.000000 1.000000 -0.000001
vn -1.000000 0.000000 0.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.034103 0.999418
vn 0.000000 0.721277 0.692647
vn 0.000000 0.045825 -0.998949
vn 0.000000 0.976260 0.216604
vn 0.000000 -0.419278 -0.907858
vn 0.000000 0.970931 0.239361
vn 0.000000 -0.748892 -0.662692
vn 0.000000 0.174022 -0.984742
vn 0.347263 -0.910507 -0.224466
vn 0.000000 -0.970931 -0.239361
vn -0.355931 -0.933234 -0.048855
vn -0.355931 0.933234 0.048857
vn 0.347263 0.910508 0.224464
vn -0.066225 0.173640 -0.982580
vn 0.066226 0.173641 -0.982580
vn 0.066226 -0.173641 0.982580
vn -0.066225 -0.173640 0.982580
vn 0.000000 0.260479 0.965479
vn 0.000000 1.000000 0.000001
vn 0.000000 0.991746 0.128214
vn 0.991368 0.131110 0.000000
vn 0.000000 0.174930 -0.984581
vn -0.964527 0.229089 0.131172
vn 0.000000 0.867811 0.496894
vn -0.358815 0.810023 0.463805
vn 0.000000 0.648393 0.761306
vn 0.358814 0.810023 0.463804
vn 0.204500 -0.950411 -0.234303
vn -0.210081 0.976347 0.051114
vn -0.037418 0.173900 -0.984052
vn 0.037418 -0.173901 0.984052
vn -0.210081 -0.976347 -0.051112
vn 0.204501 0.950412 0.234302
vn 0.037419 0.173901 -0.984052
vn -0.037418 -0.173900 0.984052
vn 0.000000 0.998632 0.052280
vn 0.355931 -0.933234 -0.048857
vn 0.000000 -0.998632 -0.052280
vn -0.347263 -0.910508 -0.224464
vn -0.347263 0.910507 0.224466
vn 0.355931 0.933234 0.048855
vn 0.210081 -0.976347 -0.051114
vn -0.204500 0.950411 0.234303
vn -0.204501 -0.950412 -0.234302
vn 0.210081 0.976347 0.051112
vn 0.000000 0.139652 -0.990201
vn 0.990201 0.139652 0.000000
vn 0.000000 0.139651 0.990201
vn -0.962655 0.130689 0.237099
vn 0.964014 0.136046 0.228405
vn 0.000000 0.721278 0.692646
vn 0.000000 0.045824 -0.998950
vn 0.000000 0.976260 0.216603
vn 0.000000 0.970931 0.239362
vn 0.000000 0.174021 -0.984742
vn 0.347263 -0.910507 -0.224464
vn 0.000000 -0.970930 -0.239362
vn -0.355931 -0.933234 -0.048857
vn -0.355931 0.933234 0.048855
vn 0.347263 0.910507 0.224466
vn -0.066226 0.173641 -0.982580
vn 0.066225 0.173640 -0.982580
vn 0.066225 -0.173640 0.982580
vn -0.066226 -0.173641 0.982580
vn 0.000000 0.260479 0.965480
vn 0.000000 0.991746 0.128218
vn 0.964527 0.229089 0.131172
vn -0.991368 0.131110 0.000000
vn 0.000000 0.867812 0.496892
vn -0.358814 0.810023 0.463804
vn 0.000000 0.648392 0.761307
vn 0.358814 0.810023 0.463805
vn 0.204501 -0.950412 -0.234302
vn -0.210081 0.976347 0.051112
vn -0.037418 0.173901 -0.984052
vn 0.037418 -0.173900 0.984052
vn -0.210081 -0.976347 -0.051114
vn 0.204501 0.950411 0.234303
vn 0.037418 0.173900 -0.984052
vn -0.037419 -0.173901 0.984052
vn 0.355931 -0.933234 -0.048855
vn -0.347263 -0.910507 -0.224466
vn -0.347263 0.910508 0.224464
vn 0.355931 0.933234 0.048857
vn 0.210081 -0.976347 -0.051112
vn -0.204501 0.950412 0.234302
vn -0.204500 -0.950411 -0.234304
vn 0.210081 0.976347 0.051114
vn 0.000000 0.139651 -0.990201
s off
f 7/1/1 6/2/1 5/3/1
f 1/4/2 4/5/2 5/6/2
f 2/7/3 5/8/3 6/9/3
f 2/10/4 3/11/4 8/12/4
f 6/13/5 7/14/5 8/15/5
f 14/16/6 15/17/6 11/18/6
f 16/19/7 12/20/7 11/21/7
f 17/22/8 13/23/8 12/24/8
f 14/25/9 10/26/9 13/27/9
f 11/28/4 12/29/4 13/30/4
f 17/31/10 53/32/10 50/33/10
f 23/34/11 19/35/11 18/36/11
f 24/37/7 20/38/7 19/39/7
f 25/40/12 21/41/12 20/42/12
f 22/43/9 18/44/9 21/45/9
f 18/46/4 19/39/4 20/38/4
f 25/47/13 29/48/13 26/49/13
f 29/48/14 33/50/14 30/51/14
f 24/52/12 28/53/12 29/54/12
f 23/55/15 27/56/15 28/57/15
f 23/34/11 22/58/11 26/59/11
f 33/50/16 37/60/16 34/61/16
f 28/53/12 32/62/12 33/63/12
f 27/56/17 31/64/17 32/65/17
f 27/66/11 26/59/11 30/67/11
f 71/68/18 41/69/18 38/70/18
f 33/63/12 32/62/12 36/71/12
f 31/64/19 35/72/19 36/60/19
f 30/67/11 34/73/11 35/74/11
f 40/75/20 39/76/20 38/77/20
f 78/78/21 63/79/21 48/80/21
f 73/81/22 39/82/22 40/83/22
f 67/84/23 43/85/23 77/86/23
f 76/87/12 48/88/12 49/89/12
f 77/90/11 74/91/11 46/92/11
f 65/93/24 45/94/24 75/95/24
f 81/96/25 69/97/25 46/98/25
f 63/99/26 64/100/26 49/101/26
f 66/102/27 47/103/27 46/12/27
f 62/104/28 44/105/28 45/106/28
f 67/107/29 68/108/29 42/109/29
f 53/23/30 57/110/30 54/111/30
f 17/31/1 16/19/1 52/112/1
f 15/113/31 51/114/31 52/112/31
f 14/115/1 50/33/1 51/114/1
f 57/110/32 61/116/32 58/117/32
f 53/27/33 52/118/33 56/119/33
f 51/120/34 55/121/34 56/122/34
f 50/17/35 54/123/35 55/124/35
f 60/125/36 59/126/36 58/117/36
f 56/119/37 60/127/37 61/128/37
f 55/121/38 59/129/38 60/107/38
f 55/124/39 54/123/39 58/130/39
f 72/131/40 40/83/40 63/79/40
f 37/132/41 65/93/41 79/133/41
f 40/75/42 41/134/42 64/100/42
f 36/135/43 62/104/43 65/136/43
f 35/137/44 67/84/44 80/138/44
f 70/139/45 38/70/45 69/97/45
f 39/76/46 66/102/46 69/140/46
f 35/141/47 34/142/47 68/108/47
f 34/143/48 37/132/48 71/68/48
f 62/144/49 78/78/49 76/145/49
f 35/137/50 73/81/50 72/131/50
f 80/138/51 77/86/51 47/44/51
f 45/146/12 44/147/12 76/87/12
f 42/148/11 74/91/11 77/90/11
f 79/133/52 75/95/52 49/149/52
f 68/150/53 81/96/53 74/151/53
f 36/152/54 72/131/54 78/78/54
f 71/68/55 79/133/55 64/153/55
f 73/81/56 80/138/56 66/154/56
f 34/143/57 70/139/57 81/96/57
f 4/155/58 1/7/58 8/156/58
f 4/157/1 7/1/1 5/3/1
f 2/158/59 1/4/59 5/6/59
f 3/156/60 2/7/60 6/9/60
f 1/159/4 2/10/4 8/12/4
f 3/7/5 6/13/5 8/15/5
f 10/160/61 14/16/61 11/18/61
f 15/113/7 16/19/7 11/21/7
f 16/161/62 17/22/62 12/24/62
f 17/162/9 14/25/9 13/27/9
f 10/163/4 11/28/4 13/30/4
f 14/115/1 17/31/1 50/33/1
f 22/58/11 23/34/11 18/36/11
f 23/55/7 24/37/7 19/39/7
f 24/52/12 25/40/12 20/42/12
f 25/47/9 22/43/9 21/45/9
f 21/45/4 18/46/4 20/38/4
f 22/43/13 25/47/13 26/49/13
f 26/49/63 29/48/63 30/51/63
f 25/40/12 24/52/12 29/54/12
f 24/37/64 23/55/64 28/57/64
f 27/66/11 23/34/11 26/59/11
f 30/51/65 33/50/65 34/61/65
f 29/54/12 28/53/12 33/63/12
f 28/57/17 27/56/17 32/65/17
f 31/164/11 27/66/11 30/67/11
f 70/139/66 71/68/66 38/70/66
f 37/165/12 33/63/12 36/71/12
f 32/65/19 31/64/19 36/60/19
f 31/164/11 30/67/11 35/74/11
f 41/134/67 40/75/67 38/77/67
f 76/145/68 78/78/68 48/80/68
f 72/131/69 73/81/69 40/83/69
f 80/138/70 67/84/70 77/86/70
f 75/166/12 76/87/12 49/89/12
f 47/167/11 77/90/11 46/92/11
f 79/133/71 65/93/71 75/95/71
f 74/151/72 81/96/72 46/98/72
f 48/168/73 63/99/73 49/101/73
f 69/140/74 66/102/74 46/12/74
f 65/136/75 62/104/75 45/106/75
f 43/169/76 67/107/76 42/109/76
f 50/170/77 53/23/77 54/111/77
f 53/32/1 17/31/1 52/112/1
f 16/19/1 15/113/1 52/112/1
f 15/113/1 14/115/1 51/114/1
f 54/111/78 57/110/78 58/117/78
f 57/171/79 53/27/79 56/119/79
f 52/172/34 51/120/34 56/122/34
f 51/173/80 50/17/80 55/124/80
f 61/116/81 60/125/81 58/117/81
f 57/171/82 56/119/82 61/128/82
f 56/122/83 55/121/83 60/107/83
f 59/174/84 55/124/84 58/130/84
f 78/78/85 72/131/85 63/79/85
f 71/68/86 37/132/86 79/133/86
f 63/99/87 40/75/87 64/100/87
f 37/175/88 36/135/88 65/136/88
f 73/81/89 35/137/89 80/138/89
f 81/96/90 70/139/90 69/97/90
f 38/77/91 39/76/91 69/140/91
f 67/107/92 35/141/92 68/108/92
f 70/139/48 34/143/48 71/68/48
f 44/176/93 62/144/93 76/145/93
f 36/152/50 35/137/50 72/131/50
f 66/154/94 80/138/94 47/44/94
f 75/166/12 45/146/12 76/87/12
f 43/177/11 42/148/11 77/90/11
f 64/153/95 79/133/95 49/149/95
f 42/178/96 68/150/96 74/151/96
f 62/144/97 36/152/97 78/78/97
f 41/69/98 71/68/98 64/153/98
f 39/82/99 73/81/99 66/154/99
f 68/150/100 34/143/100 81/96/100
f 7/179/101 4/155/101 8/156/101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB