mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
automatic formatting
This commit is contained in:
parent
9ba8f797dc
commit
2b37164ed6
@ -31,9 +31,9 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
public int dirUpper;
|
||||
public int dirRedstone;
|
||||
public int threshold;
|
||||
|
||||
|
||||
public static final long usage = 100_000;
|
||||
|
||||
|
||||
public TileEntityPADipole() {
|
||||
super(2);
|
||||
}
|
||||
@ -66,7 +66,7 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
@Override
|
||||
public void onEnter(Particle particle, ForgeDirection dir) {
|
||||
EnumCoilType type = null;
|
||||
|
||||
|
||||
int mult = 1;
|
||||
if(slots[1] != null && slots[1].getItem() == ModItems.pa_coil) {
|
||||
type = EnumUtil.grabEnumSafely(EnumCoilType.class, slots[1].getItemDamage());
|
||||
@ -78,9 +78,9 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
if(this.power < this.usage * mult) particle.crash(PAState.CRASH_NOPOWER);
|
||||
if(type == null) particle.crash(PAState.CRASH_NOCOIL);
|
||||
if(type != null && type.diMax < particle.momentum) particle.crash(PAState.CRASH_OVERSPEED);
|
||||
|
||||
|
||||
if(particle.invalid) return;
|
||||
|
||||
|
||||
particle.resetDistance();
|
||||
this.power -= this.usage * mult;
|
||||
}
|
||||
@ -96,7 +96,7 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
particle.dir = dir;
|
||||
return new BlockPos(xCoord, yCoord, zCoord).offset(dir, 2);
|
||||
}
|
||||
|
||||
|
||||
public boolean checkRedstone() {
|
||||
for(DirPos pos : getConPos()) {
|
||||
if(worldObj.isBlockIndirectlyGettingPowered(pos.getX(), pos.getY(), pos.getZ())) return true;
|
||||
@ -106,11 +106,11 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
}
|
||||
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
@ -151,12 +151,12 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
nbt.setInteger("dirRedstone", dirRedstone);
|
||||
nbt.setInteger("threshold", threshold);
|
||||
}
|
||||
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 1,
|
||||
@ -167,10 +167,10 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
zCoord + 2
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
@ -216,10 +216,10 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
if(this.dirLower > 3) this.dirLower -= 4;
|
||||
if(this.dirUpper > 3) this.dirUpper -= 4;
|
||||
if(this.dirRedstone > 3) this.dirRedstone -= 4;
|
||||
|
||||
|
||||
this.threshold = MathHelper.clamp_int(threshold, 0, 999_999_999);
|
||||
}
|
||||
|
||||
|
||||
public static ForgeDirection ditToForgeDir(int dir) {
|
||||
if(dir == 1) return ForgeDirection.EAST;
|
||||
if(dir == 2) return ForgeDirection.SOUTH;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user