mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixes
This commit is contained in:
parent
4482e10999
commit
edbe256217
@ -158,6 +158,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
|||||||
this.tanks[0].setType(2, slots);
|
this.tanks[0].setType(2, slots);
|
||||||
setupTanks();
|
setupTanks();
|
||||||
|
|
||||||
|
if(this.assembled) {
|
||||||
for(BlockPos pos : ports) {
|
for(BlockPos pos : ports) {
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
BlockPos portPos = pos.offset(dir);
|
BlockPos portPos = pos.offset(dir);
|
||||||
@ -238,6 +239,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
|||||||
if(this.coreHeat > this.coreHeatCapacity) {
|
if(this.coreHeat > this.coreHeatCapacity) {
|
||||||
meltDown();
|
meltDown();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
tanks[0].writeToNBT(data, "t0");
|
tanks[0].writeToNBT(data, "t0");
|
||||||
|
|||||||
@ -494,6 +494,12 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
|||||||
setBrokenColumn(1, ModBlocks.watz_end, 1, 2, -2);
|
setBrokenColumn(1, ModBlocks.watz_end, 1, 2, -2);
|
||||||
setBrokenColumn(1, ModBlocks.watz_end, 1, -2, 2);
|
setBrokenColumn(1, ModBlocks.watz_end, 1, -2, 2);
|
||||||
setBrokenColumn(1, ModBlocks.watz_end, 1, -2, -2);
|
setBrokenColumn(1, ModBlocks.watz_end, 1, -2, -2);
|
||||||
|
|
||||||
|
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(50, 50, 50));
|
||||||
|
|
||||||
|
for(EntityPlayer player : players) {
|
||||||
|
player.triggerAchievement(MainRegistry.achWatzBoom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBrokenColumn(int minHeight, Block b, int meta, int x, int z) {
|
private void setBrokenColumn(int minHeight, Block b, int meta, int x, int z) {
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
package com.hbm.tileentity.network;
|
package com.hbm.tileentity.network;
|
||||||
|
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
@ -11,6 +9,7 @@ import net.minecraftforge.common.util.Constants;
|
|||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public abstract class TileEntityCraneBase extends TileEntityMachineBase {
|
public abstract class TileEntityCraneBase extends TileEntityMachineBase {
|
||||||
|
|
||||||
public TileEntityCraneBase(int scount) {
|
public TileEntityCraneBase(int scount) {
|
||||||
super(scount);
|
super(scount);
|
||||||
}
|
}
|
||||||
@ -19,8 +18,8 @@ public abstract class TileEntityCraneBase extends TileEntityMachineBase {
|
|||||||
// for compatibility purposes, normal meta values are still used by default
|
// for compatibility purposes, normal meta values are still used by default
|
||||||
private ForgeDirection outputOverride = ForgeDirection.UNKNOWN;
|
private ForgeDirection outputOverride = ForgeDirection.UNKNOWN;
|
||||||
|
|
||||||
// for extra stability in case the screwdriver action doesn't get synced to other clients
|
// for extra stability in case the screwdriver action doesn't get synced to
|
||||||
@SideOnly(Side.CLIENT)
|
// other clients
|
||||||
private ForgeDirection cachedOutputOverride = ForgeDirection.UNKNOWN;
|
private ForgeDirection cachedOutputOverride = ForgeDirection.UNKNOWN;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -48,8 +47,7 @@ public abstract class TileEntityCraneBase extends TileEntityMachineBase {
|
|||||||
|
|
||||||
public void setOutputOverride(ForgeDirection direction) {
|
public void setOutputOverride(ForgeDirection direction) {
|
||||||
ForgeDirection oldSide = getOutputSide();
|
ForgeDirection oldSide = getOutputSide();
|
||||||
if (oldSide == direction)
|
if(oldSide == direction) direction = direction.getOpposite();
|
||||||
direction = direction.getOpposite();
|
|
||||||
|
|
||||||
outputOverride = direction;
|
outputOverride = direction;
|
||||||
|
|
||||||
@ -63,8 +61,7 @@ public abstract class TileEntityCraneBase extends TileEntityMachineBase {
|
|||||||
outputOverride = getOutputSide(); // save the current output, if it isn't saved yet
|
outputOverride = getOutputSide(); // save the current output, if it isn't saved yet
|
||||||
|
|
||||||
ForgeDirection oldSide = getInputSide();
|
ForgeDirection oldSide = getInputSide();
|
||||||
if (oldSide == direction)
|
if(oldSide == direction) direction = direction.getOpposite();
|
||||||
direction = direction.getOpposite();
|
|
||||||
|
|
||||||
boolean needSwapOutput = direction == getOutputSide();
|
boolean needSwapOutput = direction == getOutputSide();
|
||||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, direction.ordinal(), needSwapOutput ? 4 : 3);
|
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, direction.ordinal(), needSwapOutput ? 4 : 3);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user