mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
nicer debug particles, a bit of assemfac stuff, cart fixes
This commit is contained in:
parent
a68cad7704
commit
c57031c5f0
@ -74,11 +74,17 @@ public interface IEnergyConnector extends ILoadedTile {
|
||||
red = true;
|
||||
}
|
||||
|
||||
if(particleDebug) {
|
||||
if(particleDebug) {//
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", red ? "reddust" : "bluedust");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + world.rand.nextDouble(), y + world.rand.nextDouble(), z + world.rand.nextDouble()), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 25));
|
||||
data.setString("type", "network");
|
||||
data.setString("mode", "power");
|
||||
double posX = x + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posY = y + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posZ = z + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
data.setDouble("mX", -dir.offsetX * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mY", -dir.offsetY * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mZ", -dir.offsetZ * (red ? 0.025 : 0.1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +100,7 @@ public interface IEnergyConnector extends ILoadedTile {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = false;
|
||||
public static final boolean particleDebug = true;
|
||||
|
||||
public default Vec3 getDebugParticlePos() {
|
||||
TileEntity te = (TileEntity) this;
|
||||
|
||||
@ -87,9 +87,15 @@ public interface IEnergyUser extends IEnergyConnector {
|
||||
|
||||
if(particleDebug) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", red ? "reddust" : "greendust");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + world.rand.nextDouble(), y + world.rand.nextDouble(), z + world.rand.nextDouble()), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 25));
|
||||
data.setString("type", "network");
|
||||
data.setString("mode", "power");
|
||||
double posX = x + 0.5 - dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posY = y + 0.5 - dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posZ = z + 0.5 - dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
data.setDouble("mX", dir.offsetX * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mY", dir.offsetY * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mZ", dir.offsetZ * (red ? 0.025 : 0.1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -62,9 +62,16 @@ public interface IFluidConnector {
|
||||
|
||||
if(particleDebug) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", red ? "reddust" : "bluedust");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + world.rand.nextDouble(), y + world.rand.nextDouble(), z + world.rand.nextDouble()), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 25));
|
||||
data.setString("type", "network");
|
||||
data.setString("mode", "fluid");
|
||||
data.setInteger("color", type.getColor());
|
||||
double posX = x + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posY = y + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posZ = z + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
data.setDouble("mX", -dir.offsetX * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mY", -dir.offsetY * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mZ", -dir.offsetZ * (red ? 0.025 : 0.1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,5 +87,5 @@ public interface IFluidConnector {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = false;
|
||||
public static final boolean particleDebug = true;
|
||||
}
|
||||
|
||||
@ -48,9 +48,16 @@ public interface IFluidUser extends IFluidConnector {
|
||||
|
||||
if(particleDebug) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", red ? "reddust" : "greendust");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + world.rand.nextDouble(), y + world.rand.nextDouble(), z + world.rand.nextDouble()), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 25));
|
||||
data.setString("type", "network");
|
||||
data.setString("mode", "fluid");
|
||||
data.setInteger("color", type.getColor());
|
||||
double posX = x + 0.5 - dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posY = y + 0.5 - dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
double posZ = z + 0.5 - dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
|
||||
data.setDouble("mX", dir.offsetX * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mY", dir.offsetY * (red ? 0.025 : 0.1));
|
||||
data.setDouble("mZ", dir.offsetZ * (red ? 0.025 : 0.1));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.hbm.entity.cart;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemModMinecart;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumCartBase;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumMinecart;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityLockableBase;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
@ -54,7 +54,7 @@ public class EntityMinecartCrate extends EntityMinecartContainerBase {
|
||||
@Override
|
||||
public void killMinecart(DamageSource p_94095_1_) {
|
||||
this.setDead();
|
||||
ItemStack itemstack = DictFrame.fromOne(ModItems.cart, EnumMinecart.CRATE);
|
||||
ItemStack itemstack = ItemModMinecart.createCartItem(EnumCartBase.VANILLA, EnumMinecart.CRATE);
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
@ -82,6 +82,6 @@ public class EntityMinecartCrate extends EntityMinecartContainerBase {
|
||||
|
||||
@Override
|
||||
public ItemStack getCartItem() {
|
||||
return DictFrame.fromOne(ModItems.cart, EnumMinecart.CRATE);
|
||||
return ItemModMinecart.createCartItem(EnumCartBase.VANILLA, EnumMinecart.CRATE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,9 @@ package com.hbm.entity.cart;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemModMinecart;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumCartBase;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumMinecart;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -123,7 +124,7 @@ public class EntityMinecartDestroyer extends EntityMinecartContainerBase {
|
||||
@Override
|
||||
public void killMinecart(DamageSource p_94095_1_) {
|
||||
this.setDead();
|
||||
ItemStack itemstack = DictFrame.fromOne(ModItems.cart, EnumMinecart.DESTROYER);
|
||||
ItemStack itemstack = ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.DESTROYER);
|
||||
|
||||
if(this.func_95999_t() != null) {
|
||||
itemstack.setStackDisplayName(this.func_95999_t());
|
||||
@ -134,6 +135,6 @@ public class EntityMinecartDestroyer extends EntityMinecartContainerBase {
|
||||
|
||||
@Override
|
||||
public ItemStack getCartItem() {
|
||||
return DictFrame.fromOne(ModItems.cart, EnumMinecart.DESTROYER);
|
||||
return ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.DESTROYER);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.entity.cart;
|
||||
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemModMinecart;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumCartBase;
|
||||
import com.hbm.items.tool.ItemModMinecart.EnumMinecart;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -44,7 +44,7 @@ public class EntityMinecartOre extends EntityMinecart {
|
||||
@Override
|
||||
public void killMinecart(DamageSource p_94095_1_) {
|
||||
this.setDead();
|
||||
ItemStack itemstack = DictFrame.fromOne(ModItems.cart, EnumMinecart.EMPTY);
|
||||
ItemStack itemstack = ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.EMPTY);
|
||||
|
||||
if(this.func_95999_t() != null) {
|
||||
itemstack.setStackDisplayName(this.func_95999_t());
|
||||
@ -55,6 +55,6 @@ public class EntityMinecartOre extends EntityMinecart {
|
||||
|
||||
@Override
|
||||
public ItemStack getCartItem() {
|
||||
return DictFrame.fromOne(ModItems.cart, EnumMinecart.EMPTY);
|
||||
return ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,6 +66,9 @@ public class GUIAssemfac extends GuiInfoContainer {
|
||||
|
||||
if(assemfac.power > 0)
|
||||
drawTexturedModalRect(guiLeft + 238, guiTop + 150, 0, 219, 9, 12);
|
||||
|
||||
assemfac.water.renderTank(guiLeft + 234, guiTop + 161, this.zLevel, 7, 52);
|
||||
assemfac.steam.renderTank(guiLeft + 243, guiTop + 161, this.zLevel, 7, 52);
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LMENU))
|
||||
for(int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
|
||||
@ -114,7 +114,8 @@ public class ItemAssemblyTemplate extends Item {
|
||||
int count = AssemblerRecipes.recipeList.size();
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
ComparableStack comp = AssemblerRecipes.recipeList.get(i);
|
||||
list.add(writeType(new ItemStack(item), comp));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1657,6 +1657,22 @@ public class ClientProxy extends ServerProxy {
|
||||
text.multipleParticleScaleBy(scale);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(text);
|
||||
}
|
||||
|
||||
if("network".equals(type)) {
|
||||
ParticleDebug debug = null;
|
||||
double mX = data.getDouble("mX");
|
||||
double mY = data.getDouble("mY");
|
||||
double mZ = data.getDouble("mZ");
|
||||
|
||||
if("power".equals(data.getString("mode"))) {
|
||||
debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ);
|
||||
}
|
||||
if("fluid".equals(data.getString("mode"))) {
|
||||
int color = data.getInteger("color");
|
||||
debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ, color);
|
||||
}
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(debug);
|
||||
}
|
||||
}
|
||||
|
||||
private HashMap<Integer, Long> vanished = new HashMap();
|
||||
|
||||
73
src/main/java/com/hbm/particle/ParticleDebug.java
Normal file
73
src/main/java/com/hbm/particle/ParticleDebug.java
Normal file
@ -0,0 +1,73 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleDebug extends EntityFX {
|
||||
|
||||
private static final ResourceLocation power = new ResourceLocation(RefStrings.MODID + ":textures/particle/debug_power.png");
|
||||
private static final ResourceLocation fluid = new ResourceLocation(RefStrings.MODID + ":textures/particle/debug_fluid.png");
|
||||
private TextureManager theRenderEngine;
|
||||
private int type;
|
||||
|
||||
public ParticleDebug(TextureManager texman, World world, double x, double y, double z, double motionX, double motionY, double motionZ) {
|
||||
super(world, x, y, z);
|
||||
this.theRenderEngine = texman;
|
||||
this.particleMaxAge = 10;
|
||||
this.type = 0;
|
||||
this.motionX = motionX;
|
||||
this.motionY = motionY;
|
||||
this.motionZ = motionZ;
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public ParticleDebug(TextureManager texman, World world, double x, double y, double z, double motionX, double motionY, double motionZ, int color) {
|
||||
this(texman, world, x, y, z, motionX, motionY, motionZ);
|
||||
this.type = 1;
|
||||
this.particleRed = ((color & 0xff0000) >> 16) / 255F;
|
||||
this.particleGreen = ((color & 0x00ff00) >> 8) / 255F;
|
||||
this.particleBlue = (color & 0x0000ff) / 255F;
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tess, float interp, float x, float y, float z, float tx, float tz) {
|
||||
|
||||
this.theRenderEngine.bindTexture(type == 0 ? power : fluid);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0.0F, 1.0F, 0.0F);
|
||||
tess.setBrightness(240);
|
||||
|
||||
float scale = 0.05F;
|
||||
tess.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
|
||||
|
||||
float pX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) interp - interpPosX);
|
||||
float pY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) interp - interpPosY);
|
||||
float pZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) interp - interpPosZ);
|
||||
|
||||
tess.addVertexWithUV((double) (pX - x * scale - tx * scale), (double) (pY - y * scale), (double) (pZ - z * scale - tz * scale), 1, 1);
|
||||
tess.addVertexWithUV((double) (pX - x * scale + tx * scale), (double) (pY + y * scale), (double) (pZ - z * scale + tz * scale), 1, 0);
|
||||
tess.addVertexWithUV((double) (pX + x * scale + tx * scale), (double) (pY + y * scale), (double) (pZ + z * scale + tz * scale), 0, 0);
|
||||
tess.addVertexWithUV((double) (pX + x * scale - tx * scale), (double) (pY - y * scale), (double) (pZ + z * scale - tz * scale), 0, 1);
|
||||
tess.draw();
|
||||
|
||||
GL11.glPolygonOffset(0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
@ -95,28 +95,18 @@ public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor {
|
||||
|
||||
private DirPos[] getConPos() {
|
||||
|
||||
int offsetX = 0;
|
||||
int offsetZ = 0;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
offsetX = -dir.offsetX;
|
||||
offsetZ = -rot.offsetZ;
|
||||
|
||||
if(dir == ForgeDirection.NORTH || dir == ForgeDirection.SOUTH) {
|
||||
offsetX = rot.offsetX;
|
||||
offsetZ = dir.offsetZ;
|
||||
}
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(this.xCoord + offsetX * 2, this.yCoord, this.zCoord - offsetZ * 1, Library.POS_X),
|
||||
new DirPos(this.xCoord + offsetX * 2, this.yCoord, this.zCoord - offsetZ * 0, Library.POS_X),
|
||||
new DirPos(this.xCoord + offsetX * 1, this.yCoord, this.zCoord - offsetZ * 2, Library.NEG_Z),
|
||||
new DirPos(this.xCoord + offsetX * 0, this.yCoord, this.zCoord - offsetZ * 2, Library.NEG_Z),
|
||||
new DirPos(this.xCoord + offsetX * 1, this.yCoord, this.zCoord + offsetZ * 1, Library.POS_Z),
|
||||
new DirPos(this.xCoord + offsetX * 0, this.yCoord, this.zCoord + offsetZ * 1, Library.POS_Z),
|
||||
new DirPos(this.xCoord - offsetX * 1, this.yCoord, this.zCoord + offsetZ * 0, Library.NEG_Z),
|
||||
new DirPos(this.xCoord - offsetX * 1, this.yCoord, this.zCoord - offsetZ * 1, Library.NEG_Z)
|
||||
new DirPos(this.xCoord - dir.offsetX * 2, this.yCoord, this.zCoord - dir.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(this.xCoord - dir.offsetX * 2 + rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ * 2 + rot.offsetZ, dir.getOpposite()),
|
||||
new DirPos(this.xCoord + dir.offsetX, this.yCoord, this.zCoord - dir.offsetZ, dir),
|
||||
new DirPos(this.xCoord + dir.offsetX + rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ + rot.offsetZ, dir),
|
||||
new DirPos(this.xCoord - rot.offsetX, this.yCoord, this.zCoord - rot.offsetZ, rot.getOpposite()),
|
||||
new DirPos(this.xCoord - dir.offsetX - rot.offsetX, this.yCoord, this.zCoord - dir.offsetZ - rot.offsetZ, rot.getOpposite()),
|
||||
new DirPos(this.xCoord + rot.offsetX * 2, this.yCoord, this.zCoord + rot.offsetZ * 2, rot),
|
||||
new DirPos(this.xCoord - dir.offsetX + rot.offsetX * 2, this.yCoord, this.zCoord - dir.offsetZ + rot.offsetZ * 2, rot),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,9 @@ import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -15,7 +17,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase {
|
||||
public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase implements IFluidStandardTransceiver {
|
||||
|
||||
public AssemblerArm[] arms;
|
||||
|
||||
@ -45,6 +47,10 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
this.speed = 100;
|
||||
this.consumption = 100;
|
||||
|
||||
@ -94,6 +100,30 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase {
|
||||
steam.readFromNBT(nbt, "s");
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord - dir.offsetX * 3 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ * 5, rot),
|
||||
new DirPos(xCoord + dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 5, rot),
|
||||
new DirPos(xCoord - dir.offsetX * 3 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 3 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 3, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 3, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 2, dir)
|
||||
};
|
||||
}
|
||||
|
||||
public static class AssemblerArm {
|
||||
public double[] angles = new double[4];
|
||||
public double[] prevAngles = new double[4];
|
||||
@ -324,4 +354,14 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase {
|
||||
|
||||
return outpos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { steam };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { water };
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,12 +161,12 @@ public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase {
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (2 - i) + rot.offsetX * 3, yCoord + 4, zCoord + dir.offsetZ * (2 - i) + rot.offsetZ * 3, rot);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (2 - i) - rot.offsetX * 2, yCoord + 4, zCoord + dir.offsetZ * (2 - i) - rot.offsetZ * 2, rot.getOpposite());
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (3 - i) + rot.offsetX * 3, yCoord + 4, zCoord + dir.offsetZ * (3 - i) + rot.offsetZ * 3, Library.POS_Y);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (3 - i) - rot.offsetX * 2, yCoord + 4, zCoord + dir.offsetZ * (3 - i) - rot.offsetZ * 2, Library.POS_Y);
|
||||
|
||||
for(int j = 0; j < 2; j++) {
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (2 - i) + rot.offsetX * 5, yCoord + 1 + j, zCoord + dir.offsetZ * (2 - i) + rot.offsetZ * 5, rot);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (2 - i) - rot.offsetX * 4, yCoord + 1 + j, zCoord + dir.offsetZ * (2 - i) - rot.offsetZ * 4, rot.getOpposite());
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (3 - i) + rot.offsetX * 5, yCoord + 1 + j, zCoord + dir.offsetZ * (3 - i) + rot.offsetZ * 5, rot);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * (3 - i) - rot.offsetX * 4, yCoord + 1 + j, zCoord + dir.offsetZ * (3 - i) - rot.offsetZ * 4, rot.getOpposite());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
this.trySubscribe(type, world, xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
this.trySubscribe(type, world, xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
this.trySubscribe(type, world, xCoord + 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
this.trySubscribe(type, world, xCoord - 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
this.trySubscribe(type, world, xCoord + 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
this.trySubscribe(type, world, xCoord - 3, yCoord, zCoord + 1, Library.NEG_X);
|
||||
this.trySubscribe(type, world, xCoord + 3, yCoord, zCoord - 1, Library.POS_X);
|
||||
this.trySubscribe(type, world, xCoord - 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
}
|
||||
|
||||
@ -71,8 +71,8 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord + 1, Library.NEG_X);
|
||||
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord - 1, Library.POS_X);
|
||||
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user