mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
blargle
This commit is contained in:
parent
5336b7cfb4
commit
7d635bfc0d
@ -33,19 +33,19 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
/** The core, gets its own TE and runs the simulation, only one per pile */
|
||||
public static final int META_CORE = 1;
|
||||
/** Channel mid segment for channel intersect checks */
|
||||
public static final int META_CHANNEL = 3;
|
||||
public static final int META_CHANNEL = 2;
|
||||
/** Startpoint of the channel */
|
||||
public static final int META_FUEL_IN = 4;
|
||||
public static final int META_FUEL_IN = 3;
|
||||
/** Endpoint of the fuel channel */
|
||||
public static final int META_FUEL_OUT = 5;
|
||||
public static final int META_FUEL_OUT = 4;
|
||||
/** Startpoint of the ventilation channel */
|
||||
public static final int META_AIR_IN = 6;
|
||||
public static final int META_AIR_IN = 5;
|
||||
/** Endpoint of the ventilation channel */
|
||||
public static final int META_AIR_OUT = 7;
|
||||
public static final int META_AIR_OUT = 6;
|
||||
/** Control rod channel */
|
||||
public static final int META_CONTROL = 8;
|
||||
public static final int META_CONTROL = 7;
|
||||
/** Edge of our pile "cube" to prevent channels from being drilled there */
|
||||
public static final int META_EDGE = 9;
|
||||
public static final int META_EDGE = 8;
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon iconTop;
|
||||
|
||||
@ -85,10 +85,10 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable {
|
||||
if(tile instanceof TileEntityPileBaseMK2) {
|
||||
TileEntityPileBaseMK2 pile = (TileEntityPileBaseMK2) tile;
|
||||
world.removeTileEntity(x, y, z);
|
||||
world.setBlock(x, y, z, ModBlocks.pile_brick);
|
||||
if(pile.coreY >= 0) world.setBlock(x, y, z, ModBlocks.pile_brick);
|
||||
|
||||
TileEntityPileCore core = pile.getCore();
|
||||
if(core != null) core.destroy();
|
||||
if(core != null && !core.isInvalid()) core.destroy();
|
||||
|
||||
} else {
|
||||
world.removeTileEntity(x, y, z);
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.machine.pile;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachinePWRController;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileBaseMK2;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileCore;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileCore.PileOrientation;
|
||||
|
||||
@ -128,6 +129,10 @@ public class BlockPileBrick extends Block implements IToolable {
|
||||
core.orientation = PileOrientation.getOrientation(dir);
|
||||
} else {
|
||||
world.setBlock(iX, iY, iZ, ModBlocks.pile_block, BlockPile.META_DUMMY, 3);
|
||||
TileEntityPileBaseMK2 pile = (TileEntityPileBaseMK2) world.getTileEntity(iX, iY, iZ);
|
||||
pile.coreX = x;
|
||||
pile.coreY = y;
|
||||
pile.coreZ = z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -388,6 +388,9 @@ public class TileMappings {
|
||||
put(TileEntityPileSource.class, "tileentity_pile_source");
|
||||
put(TileEntityPileBreedingFuel.class, "tileentity_pile_breedingfuel");
|
||||
put(TileEntityPileNeutronDetector.class, "tileentity_pile_neutrondetector");
|
||||
|
||||
put(TileEntityPileCore.class, "tileentity_pile_core");
|
||||
put(TileEntityPileBaseMK2.class, "tileentity_pile_block");
|
||||
}
|
||||
|
||||
private static void putRBMK() {
|
||||
|
||||
@ -11,14 +11,14 @@ public class TileEntityPileBaseMK2 extends TileEntityTickingBase {
|
||||
|
||||
public TileEntityPileCore cachedCore;
|
||||
public int coreX;
|
||||
public int coreY;
|
||||
public int coreY = -999;
|
||||
public int coreZ;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
if(coreY >= 0) {
|
||||
|
||||
TileEntityPileCore controller = getCore();
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ public class TileEntityPileCore extends TileEntityTickingBase {
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.pile_brick);
|
||||
}
|
||||
|
||||
public static enum PileOrientation {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user