From f2a4ee69cfe332f51093122a368425f8b9b7dce1 Mon Sep 17 00:00:00 2001 From: Boblet Date: Tue, 14 Sep 2021 16:57:54 +0200 Subject: [PATCH] finished large cooling tower --- .../hbm/blocks/machine/MachineTowerLarge.java | 17 +++++++++++++ .../entity/logic/EntityNukeExplosionMK3.java | 2 +- .../machine/TileEntityTowerLarge.java | 24 ++++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hbm/blocks/machine/MachineTowerLarge.java b/src/main/java/com/hbm/blocks/machine/MachineTowerLarge.java index 744e32ebe..2f92ca090 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineTowerLarge.java +++ b/src/main/java/com/hbm/blocks/machine/MachineTowerLarge.java @@ -6,6 +6,7 @@ import com.hbm.tileentity.machine.TileEntityTowerLarge; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; public class MachineTowerLarge extends BlockDummyable { @@ -30,4 +31,20 @@ public class MachineTowerLarge extends BlockDummyable { public int getOffset() { return 4; } + + @Override + public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) { + super.fillSpace(world, x, y, z, dir, o); + + x = x + dir.offsetX * o; + z = z + dir.offsetZ * o; + + for(int i = 2; i <= 6; i++) { + ForgeDirection dr2 = ForgeDirection.getOrientation(i); + ForgeDirection rot = dr2.getRotation(ForgeDirection.UP); + this.makeExtra(world, x + dr2.offsetX * 4, y, z + dr2.offsetZ * 4); + this.makeExtra(world, x + dr2.offsetX * 4 + rot.offsetX * 2, y, z + dr2.offsetZ * 4 + rot.offsetZ * 2); + this.makeExtra(world, x + dr2.offsetX * 4 + rot.offsetX * -2, y, z + dr2.offsetZ * 4 + rot.offsetZ * -2); + } + } } diff --git a/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK3.java b/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK3.java index ef15944cb..9e6b97432 100644 --- a/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK3.java +++ b/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK3.java @@ -105,7 +105,7 @@ public class EntityNukeExplosionMK3 extends Entity { } - private EntityNukeExplosionMK3(World p_i1582_1_) { + public EntityNukeExplosionMK3(World p_i1582_1_) { super(p_i1582_1_); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityTowerLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityTowerLarge.java index d9a1f0e05..c9fcbf984 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityTowerLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityTowerLarge.java @@ -1,11 +1,33 @@ package com.hbm.tileentity.machine; +import com.hbm.handler.FluidTypeHandler.FluidType; +import com.hbm.inventory.FluidTank; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityTowerLarge extends TileEntity { +public class TileEntityTowerLarge extends TileEntityCondenser { + + public TileEntityTowerLarge() { + tanks = new FluidTank[2]; + tanks[0] = new FluidTank(FluidType.SPENTSTEAM, 10000, 0); + tanks[1] = new FluidTank(FluidType.WATER, 10000, 1); + } + + @Override + public void fillFluidInit(FluidType type) { + + for(int i = 2; i <= 6; i++) { + ForgeDirection dir = ForgeDirection.getOrientation(i); + ForgeDirection rot = dir.getRotation(ForgeDirection.UP); + fillFluid(xCoord + dir.offsetX * 5, yCoord, zCoord + dir.offsetZ * 5, getTact(), type); + fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * 2, getTact(), type); + fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * -2, getTact(), type); + } + } AxisAlignedBB bb = null;