Code cleanup
This commit is contained in:
parent
014e710990
commit
e718c9863b
70 changed files with 436 additions and 405 deletions
|
@ -782,11 +782,8 @@ public class WarpDrive {
|
|||
|
||||
// Register a Block with the default ItemBlock class.
|
||||
public static <BLOCK extends Block> BLOCK register(final BLOCK block) {
|
||||
if (block instanceof IBlockBase) {
|
||||
return register(block, ((IBlockBase) block).createItemBlock());
|
||||
} else {
|
||||
return register(block, new ItemBlock(block));
|
||||
}
|
||||
assert block instanceof IBlockBase;
|
||||
return register(block, ((IBlockBase) block).createItemBlock());
|
||||
}
|
||||
|
||||
// Register a Block with a custom ItemBlock class.
|
||||
|
@ -1035,4 +1032,4 @@ public class WarpDrive {
|
|||
event.getRegistry().register(villagerProfession);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,7 +78,7 @@ public abstract class BlockAbstractBase extends Block implements IBlockBase {
|
|||
super.onBlockPlacedBy(world, blockPos, blockState, entityLiving, itemStack);
|
||||
final boolean isRotating = blockState.getProperties().containsKey(BlockProperties.FACING);
|
||||
if (isRotating) {
|
||||
EnumFacing enumFacing = Commons.getFacingFromEntity(entityLiving);
|
||||
final EnumFacing enumFacing = Commons.getFacingFromEntity(entityLiving);
|
||||
world.setBlockState(blockPos, blockState.withProperty(BlockProperties.FACING, enumFacing));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,8 +62,6 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
|||
setCreativeTab(WarpDrive.creativeTabMain);
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this);
|
||||
|
||||
setDefaultState(blockState.getBaseState());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -82,13 +80,13 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(final IBlockState state) {
|
||||
public EnumBlockRenderType getRenderType(final IBlockState blockState) {
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(final World world, final BlockPos pos, final IBlockState state) {
|
||||
super.onBlockAdded(world, pos, state);
|
||||
public void onBlockAdded(final World world, final BlockPos pos, final IBlockState blockState) {
|
||||
super.onBlockAdded(world, pos, blockState);
|
||||
final TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity instanceof IBlockUpdateDetector) {
|
||||
((IBlockUpdateDetector) tileEntity).onBlockUpdateDetected();
|
||||
|
@ -143,8 +141,8 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getPickBlock(@Nonnull final IBlockState state, final RayTraceResult target, @Nonnull final World world, @Nonnull final BlockPos blockPos, final EntityPlayer entityPlayer) {
|
||||
final ItemStack itemStack = super.getPickBlock(state, target, world, blockPos, entityPlayer);
|
||||
public ItemStack getPickBlock(@Nonnull final IBlockState blockState, final RayTraceResult target, @Nonnull final World world, @Nonnull final BlockPos blockPos, final EntityPlayer entityPlayer) {
|
||||
final ItemStack itemStack = super.getPickBlock(blockState, target, world, blockPos, entityPlayer);
|
||||
final TileEntity tileEntity = world.getTileEntity(blockPos);
|
||||
final NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
if (tileEntity instanceof TileEntityAbstractBase) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public abstract class BlockAbstractOmnipanel extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void addCollisionBoxToList(final IBlockState state, final @Nonnull World world, final @Nonnull BlockPos blockPos,
|
||||
public void addCollisionBoxToList(final IBlockState blockState, final @Nonnull World world, final @Nonnull BlockPos blockPos,
|
||||
final @Nonnull AxisAlignedBB entityBox, final @Nonnull List<AxisAlignedBB> collidingBoxes,
|
||||
final @Nullable Entity entity, boolean isActualState) {
|
||||
final MutableBlockPos mutableBlockPos = new MutableBlockPos(blockPos);
|
||||
|
@ -202,7 +202,7 @@ public abstract class BlockAbstractOmnipanel extends BlockAbstractBase {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(final IBlockState state, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
public AxisAlignedBB getBoundingBox(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
final MutableBlockPos mutableBlockPos = new MutableBlockPos(blockPos);
|
||||
|
||||
// get direct connections
|
||||
|
|
|
@ -30,7 +30,7 @@ public abstract class BlockAbstractRotatingContainer extends BlockAbstractContai
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,8 @@ public class BlockChunkLoader extends BlockAbstractContainer {
|
|||
setTranslationKey("warpdrive.machines.chunk_loader." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -33,7 +34,7 @@ public class BlockChunkLoader extends BlockAbstractContainer {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,9 @@ public class BlockLaserMedium extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.machines.laser_medium." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(LEVEL, 0));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(LEVEL, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -22,8 +22,6 @@ public class BlockSecurityStation extends BlockAbstractContainer {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setTranslationKey("warpdrive.machines.security_station");
|
||||
|
||||
setDefaultState(getDefaultState());
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -44,8 +44,8 @@ public abstract class TileEntityAbstractEnergy extends TileEntityAbstractMachine
|
|||
private long energyStored_internal = 0;
|
||||
public static final double EU_PER_INTERNAL = 1.0D;
|
||||
public static final double RF_PER_INTERNAL = 1800.0D / 437.5D;
|
||||
public static final int IC2_sinkTier_max = Integer.MAX_VALUE;
|
||||
public static final int IC2_sourceTier_max = 20;
|
||||
// public static final int IC2_sinkTier_max = Integer.MAX_VALUE;
|
||||
// public static final int IC2_sourceTier_max = 20;
|
||||
protected int IC2_sinkTier = 3;
|
||||
protected int IC2_sourceTier = 3;
|
||||
protected boolean isEnergyLostWhenBroken = true;
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class BlockAbstractAccelerator extends BlockAbstractBase impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canCreatureSpawn(@Nonnull IBlockState blockState, @Nonnull IBlockAccess world, @Nonnull BlockPos blockPos, SpawnPlacementType type) {
|
||||
public boolean canCreatureSpawn(@Nonnull IBlockState blockState, @Nonnull IBlockAccess blockAccess, @Nonnull BlockPos blockPos, SpawnPlacementType type) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@ public class BlockAcceleratorControlPoint extends BlockAbstractAccelerator imple
|
|||
setTranslationKey("warpdrive.atomic.accelerator_control_point");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -37,7 +38,7 @@ public class BlockAcceleratorControlPoint extends BlockAbstractAccelerator imple
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,8 @@ public class BlockAcceleratorController extends BlockAbstractContainer {
|
|||
setTranslationKey("warpdrive.atomic.accelerator_controller");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -34,7 +35,7 @@ public class BlockAcceleratorController extends BlockAbstractContainer {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,8 @@ public class BlockChiller extends BlockAbstractAccelerator {
|
|||
setTranslationKey("warpdrive.atomic.chiller." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -49,7 +50,7 @@ public class BlockChiller extends BlockAbstractAccelerator {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,8 @@ public class BlockParticlesCollider extends BlockAbstractAccelerator {
|
|||
setTranslationKey("warpdrive.atomic.particles_collider");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -30,7 +31,7 @@ public class BlockParticlesCollider extends BlockAbstractAccelerator {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,8 @@ public class BlockParticlesInjector extends BlockAcceleratorControlPoint {
|
|||
setTranslationKey("warpdrive.atomic.particles_injector");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -32,7 +33,7 @@ public class BlockParticlesInjector extends BlockAcceleratorControlPoint {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -145,7 +145,7 @@ public class TileEntityAcceleratorControlPoint extends TileEntityAbstractMachine
|
|||
controlChannelRequested = Commons.toInt(arguments[0]);
|
||||
} catch (final Exception exception) {
|
||||
if (WarpDriveConfig.LOGGING_LUA) {
|
||||
WarpDrive.logger.error(String.format("%s LUA error on enable(): Integer expected for 1st argument %s",
|
||||
WarpDrive.logger.error(String.format("%s LUA error on controlChannel(): Integer expected for 1st argument %s",
|
||||
this, arguments[0]));
|
||||
}
|
||||
return new Object[] { controlChannel };
|
||||
|
|
|
@ -42,24 +42,24 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
public boolean isFullBlock(IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(final IBlockState state, final IBlockAccess blockAccess, final BlockPos pos) {
|
||||
public boolean isAir(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -99,13 +99,13 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Item getItemDropped(final IBlockState state, final Random rand, final int fortune) {
|
||||
public Item getItemDropped(final IBlockState blockState, final Random rand, final int fortune) {
|
||||
return Items.AIR;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,9 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer {
|
|||
setTranslationKey("warpdrive.breathing.air_generator." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -46,8 +47,8 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7))
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7))
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,19 +63,19 @@ public class BlockAirShield extends BlockAbstractOmnipanel {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(final IBlockState state) {
|
||||
public boolean isFullBlock(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@ public class BlockAirSource extends BlockAbstractAir {
|
|||
public BlockAirSource(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(BlockProperties.FACING, EnumFacing.DOWN));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -28,7 +30,7 @@ public class BlockAirSource extends BlockAbstractAir {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,7 +23,9 @@ public class BlockLaserTreeFarm extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.collection.laser_tree_farm");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumLaserTreeFarmMode.INACTIVE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(MODE, EnumLaserTreeFarmMode.INACTIVE)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -23,7 +23,9 @@ public class BlockMiningLaser extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.collection.mining_laser");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumMiningLaserMode.INACTIVE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(MODE, EnumMiningLaserMode.INACTIVE)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -33,7 +33,9 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[0] * 5 / 3);
|
||||
setSoundType(SoundType.METAL);
|
||||
setTranslationKey(unlocalizedName);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockProperties.FACING, EnumFacing.NORTH));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
);
|
||||
|
||||
setLightLevel(14.0F / 15.0F);
|
||||
}
|
||||
|
@ -51,7 +53,7 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,13 +76,13 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullCube(final IBlockState state) {
|
||||
public boolean isFullCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -94,14 +96,14 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public IBlockState withRotation(@Nonnull final IBlockState state, final Rotation rot) {
|
||||
return state.withProperty(BlockProperties.FACING, rot.rotate(state.getValue(BlockProperties.FACING)));
|
||||
public IBlockState withRotation(@Nonnull final IBlockState blockState, final Rotation rot) {
|
||||
return blockState.withProperty(BlockProperties.FACING, rot.rotate(blockState.getValue(BlockProperties.FACING)));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public IBlockState withMirror(@Nonnull final IBlockState state, final Mirror mirrorIn) {
|
||||
return state.withRotation(mirrorIn.toRotation(state.getValue(BlockProperties.FACING)));
|
||||
public IBlockState withMirror(@Nonnull final IBlockState blockState, final Mirror mirrorIn) {
|
||||
return blockState.withRotation(mirrorIn.toRotation(blockState.getValue(BlockProperties.FACING)));
|
||||
}
|
||||
}
|
|
@ -37,47 +37,47 @@ public class BlockBedrockGlass extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
public boolean isFullBlock(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(final IBlockState state, final IBlockAccess world, final BlockPos pos) {
|
||||
public boolean isAir(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable(final IBlockAccess worldIn, @Nonnull final BlockPos blockPos) {
|
||||
public boolean isReplaceable(final IBlockAccess blockAccess, @Nonnull final BlockPos blockPos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(final World worldIn, @Nonnull final BlockPos blockPos) {
|
||||
public boolean canPlaceBlockAt(final World world, @Nonnull final BlockPos blockPos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Item getItemDropped(final IBlockState state, final Random rand, final int fortune) {
|
||||
public Item getItemDropped(final IBlockState blockState, final Random rand, final int fortune) {
|
||||
return Items.AIR;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,9 @@ public class BlockDecorative extends BlockAbstractBase {
|
|||
setHardness(1.5f);
|
||||
setTranslationKey("warpdrive.decoration.decorative.");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(TYPE, EnumDecorativeType.PLAIN));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(TYPE, EnumDecorativeType.PLAIN)
|
||||
);
|
||||
itemStackCache = new ItemStack[EnumDecorativeType.length];
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ public class BlockGas extends BlockAbstractBase {
|
|||
setHardness(0.0F);
|
||||
setTranslationKey("warpdrive.decoration.gas");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(COLOR, EnumGasColor.RED));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(COLOR, EnumGasColor.RED)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -84,24 +86,24 @@ public class BlockGas extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
public boolean isFullBlock(IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(final IBlockState state, final IBlockAccess world, final BlockPos pos) {
|
||||
public boolean isAir(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -113,30 +115,30 @@ public class BlockGas extends BlockAbstractBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable(final IBlockAccess worldIn, @Nonnull final BlockPos blockPos) {
|
||||
public boolean isReplaceable(final IBlockAccess blockAccess, @Nonnull final BlockPos blockPos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(final World worldIn, @Nonnull final BlockPos blockPos) {
|
||||
public boolean canPlaceBlockAt(final World world, @Nonnull final BlockPos blockPos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck(final IBlockState state, final boolean hitIfLiquid) {
|
||||
public boolean canCollideCheck(final IBlockState blockState, final boolean hitIfLiquid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Item getItemDropped(final IBlockState state, final Random rand, final int fortune) {
|
||||
public Item getItemDropped(final IBlockState blockState, final Random rand, final int fortune) {
|
||||
return Items.AIR;
|
||||
}
|
||||
|
||||
|
@ -147,7 +149,7 @@ public class BlockGas extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState state) {
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ public class BlockLamp_bubble extends BlockAbstractLamp {
|
|||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
switch (state.getValue(BlockProperties.FACING)) {
|
||||
public AxisAlignedBB getBoundingBox(IBlockState blockState, IBlockAccess source, BlockPos pos) {
|
||||
switch (blockState.getValue(BlockProperties.FACING)) {
|
||||
case DOWN : return AABB_DOWN ;
|
||||
case UP : return AABB_UP ;
|
||||
case NORTH: return AABB_NORTH;
|
||||
|
@ -44,7 +44,7 @@ public class BlockLamp_bubble extends BlockAbstractLamp {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState state) {
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ public class BlockLamp_flat extends BlockAbstractLamp {
|
|||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
switch (state.getValue(BlockProperties.FACING)) {
|
||||
public AxisAlignedBB getBoundingBox(IBlockState blockState, IBlockAccess source, BlockPos pos) {
|
||||
switch (blockState.getValue(BlockProperties.FACING)) {
|
||||
case DOWN : return AABB_DOWN ;
|
||||
case UP : return AABB_UP ;
|
||||
case NORTH: return AABB_NORTH;
|
||||
|
|
|
@ -26,8 +26,8 @@ public class BlockLamp_long extends BlockAbstractLamp {
|
|||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
switch (state.getValue(BlockProperties.FACING)) {
|
||||
public AxisAlignedBB getBoundingBox(IBlockState blockState, IBlockAccess source, BlockPos pos) {
|
||||
switch (blockState.getValue(BlockProperties.FACING)) {
|
||||
case DOWN : return AABB_DOWN ;
|
||||
case UP : return AABB_UP ;
|
||||
case NORTH: return AABB_NORTH;
|
||||
|
|
|
@ -33,9 +33,10 @@ public class BlockCloakingCoil extends BlockAbstractBase {
|
|||
setTranslationKey("warpdrive.detection.cloaking_coil");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
.withProperty(OUTER, false)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.UP));
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
.withProperty(OUTER, false)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.UP)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -53,12 +54,12 @@ public class BlockCloakingCoil extends BlockAbstractBase {
|
|||
// 7 = not used
|
||||
// 1-6 = outer facing
|
||||
// 0 = inner
|
||||
final boolean isActive = (metadata & 8) != 0;
|
||||
final boolean isOuter = (metadata & 7) > 0;
|
||||
final boolean isActive = (metadata & 0x8) != 0;
|
||||
final boolean isOuter = (metadata & 0x7) > 0;
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, isActive)
|
||||
.withProperty(OUTER, isOuter)
|
||||
.withProperty(BlockProperties.FACING, isOuter ? EnumFacing.byIndex((metadata & 7) - 1) : EnumFacing.UP);
|
||||
.withProperty(BlockProperties.FACING, isOuter ? EnumFacing.byIndex((metadata & 0x7) - 1) : EnumFacing.UP);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -69,7 +70,7 @@ public class BlockCloakingCoil extends BlockAbstractBase {
|
|||
}
|
||||
|
||||
public static void setBlockState(@Nonnull final World world, @Nonnull final BlockPos blockPos, final boolean isActive, final boolean isOuter, final EnumFacing enumFacing) {
|
||||
IBlockState blockStateActual = world.getBlockState(blockPos);
|
||||
final IBlockState blockStateActual = world.getBlockState(blockPos);
|
||||
IBlockState blockStateNew = blockStateActual.withProperty(BlockProperties.ACTIVE, isActive).withProperty(OUTER, isOuter);
|
||||
if (enumFacing != null) {
|
||||
blockStateNew = blockStateNew.withProperty(BlockProperties.FACING, enumFacing);
|
||||
|
|
|
@ -28,7 +28,9 @@ public class BlockCloakingCore extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.detection.cloaking_core");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(BlockProperties.ACTIVE, false));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -23,7 +23,9 @@ public class BlockRadar extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.detection.radar");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumRadarMode.INACTIVE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(MODE, EnumRadarMode.INACTIVE)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -36,7 +36,8 @@ public class BlockSiren extends BlockAbstractContainer {
|
|||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN) );
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -58,7 +58,7 @@ public class TileEntitySiren extends TileEntityAbstractMachine {
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( world == null
|
||||
|| !world.isRemote ) {
|
||||
return;
|
||||
|
|
|
@ -29,13 +29,13 @@ public class BlockEnanReactorFrameGlass extends BlockAbstractBase {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState state) {
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ public class BlockEnanReactorFramePlain extends BlockAbstractBase {
|
|||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] / 3 * 5 / 3);
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockProperties.FRAME, EnumFrameType.PLAIN));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FRAME, EnumFrameType.PLAIN)
|
||||
);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class BlockAbstractForceField extends BlockAbstractContainer {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
setBlockUnbreakable();
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(FREQUENCY, 0)
|
||||
);
|
||||
.withProperty(FREQUENCY, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -178,19 +178,19 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
public boolean isFullBlock(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(final IBlockState state) {
|
||||
public EnumBlockRenderType getRenderType(final IBlockState blockState) {
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,9 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
setTranslationKey("warpdrive.force_field.projector." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.NORTH)
|
||||
.withProperty(IS_DOUBLE_SIDED, false)
|
||||
);
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
.withProperty(IS_DOUBLE_SIDED, false)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -80,7 +80,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7))
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7))
|
||||
.withProperty(IS_DOUBLE_SIDED, metadata > 7);
|
||||
}
|
||||
|
||||
|
@ -134,21 +134,21 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullCube(final IBlockState state) {
|
||||
public boolean isFullCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(final IBlockState state, final IBlockAccess source, final BlockPos pos) {
|
||||
switch (state.getValue(BlockProperties.FACING)) {
|
||||
public AxisAlignedBB getBoundingBox(final IBlockState blockState, final IBlockAccess source, final BlockPos pos) {
|
||||
switch (blockState.getValue(BlockProperties.FACING)) {
|
||||
case DOWN : return AABB_DOWN ;
|
||||
case UP : return AABB_UP ;
|
||||
case NORTH: return AABB_NORTH;
|
||||
|
@ -180,8 +180,8 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(final IBlockState state) {
|
||||
return state.getValue(IS_DOUBLE_SIDED) ? 1 : 0;
|
||||
public int damageDropped(final IBlockState blockState) {
|
||||
return blockState.getValue(IS_DOUBLE_SIDED) ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,7 +33,9 @@ public class BlockForceFieldRelay extends BlockAbstractForceField {
|
|||
|
||||
setTranslationKey("warpdrive.force_field.relay." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(UPGRADE, EnumForceFieldUpgrade.NONE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(UPGRADE, EnumForceFieldUpgrade.NONE)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -57,8 +59,8 @@ public class BlockForceFieldRelay extends BlockAbstractForceField {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getActualState(@Nonnull final IBlockState blockState, final IBlockAccess world, final BlockPos pos) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
public IBlockState getActualState(@Nonnull final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos pos) {
|
||||
final TileEntity tileEntity = blockAccess.getTileEntity(pos);
|
||||
if (tileEntity instanceof TileEntityForceFieldRelay) {
|
||||
return blockState.withProperty(UPGRADE, ((TileEntityForceFieldRelay) tileEntity).getUpgrade());
|
||||
} else {
|
||||
|
|
|
@ -892,7 +892,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
public float getRotationYaw() {
|
||||
final int metadata = getBlockMetadata();
|
||||
float totalYaw;
|
||||
switch (EnumFacing.byIndex(metadata & 7)) {
|
||||
switch (EnumFacing.byIndex(metadata & 0x7)) {
|
||||
case DOWN : totalYaw = 0.0F; break;
|
||||
case UP : totalYaw = 0.0F; break;
|
||||
case NORTH: totalYaw = 90.0F; break;
|
||||
|
@ -910,7 +910,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
public float getRotationPitch() {
|
||||
final int metadata = getBlockMetadata();
|
||||
float totalPitch;
|
||||
switch (EnumFacing.byIndex(metadata & 7)) {
|
||||
switch (EnumFacing.byIndex(metadata & 0x7)) {
|
||||
case DOWN : totalPitch = 180.0F; break;
|
||||
case UP : totalPitch = 0.0F; break;
|
||||
case NORTH: totalPitch = -90.0F; break;
|
||||
|
|
|
@ -53,13 +53,13 @@ public class BlockHullGlass extends BlockColored implements IBlockBase, IDamageR
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState state) {
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class BlockHullGlass extends BlockColored implements IBlockBase, IDamageR
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState state) {
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag
|
|||
setLightLevel(10.0F / 15.0F);
|
||||
setSoundType(SoundType.GLASS);
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".omnipanel.");
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockColored.COLOR, EnumDyeColor.WHITE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockColored.COLOR, EnumDyeColor.WHITE)
|
||||
);
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this, new ItemBlockHull(this));
|
||||
}
|
||||
|
@ -46,7 +48,7 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver
|
|||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()]);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] * 5 / 3);
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".plain.");
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockColored.COLOR, EnumDyeColor.WHITE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockColored.COLOR, EnumDyeColor.WHITE)
|
||||
);
|
||||
setCreativeTab(WarpDrive.creativeTabHull);
|
||||
}
|
||||
|
||||
|
@ -54,7 +56,7 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -76,7 +77,8 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
WarpDrive.register(this, new ItemBlockHullSlab(this));
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(VARIANT, EnumVariant.PLAIN_DOWN));
|
||||
.withProperty(VARIANT, EnumVariant.PLAIN_DOWN)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -101,7 +103,7 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
@ -171,21 +173,21 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
return ((BlockSlab) state.getBlock()).isDouble();
|
||||
public boolean isFullBlock(IBlockState blockState) {
|
||||
return ((BlockSlab) blockState.getBlock()).isDouble();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isFullCube(final IBlockState state) {
|
||||
return ((BlockSlab) state.getBlock()).isDouble();
|
||||
public boolean isFullCube(final IBlockState blockState) {
|
||||
return ((BlockSlab) blockState.getBlock()).isDouble();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(final World world, final BlockPos blockPos, final EnumFacing facing,
|
||||
public IBlockState getStateForPlacement(@Nonnull final World world, @Nonnull final BlockPos blockPos, @Nonnull final EnumFacing facing,
|
||||
final float hitX, final float hitY, final float hitZ, final int metadata,
|
||||
final EntityLivingBase entityLivingBase) {
|
||||
@Nonnull final EntityLivingBase entityLivingBase, final EnumHand enumHand) {
|
||||
final IBlockState blockState = getStateFromMeta(metadata);
|
||||
|
||||
// full block?
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BlockHullStairs extends BlockStairs implements IBlockBase, IDamageR
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState blockState) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ public class ItemBlockHullSlab extends ItemBlockHull {
|
|||
@Nonnull
|
||||
@Override
|
||||
public EnumActionResult onItemUse(@Nonnull final EntityPlayer entityPlayer, final World world, @Nonnull final BlockPos blockPos,
|
||||
@Nonnull final EnumHand hand, @Nonnull EnumFacing facing,
|
||||
@Nonnull final EnumHand enumHand, @Nonnull EnumFacing facing,
|
||||
final float hitX, final float hitY, final float hitZ) {
|
||||
// get context
|
||||
final ItemStack itemStackHeld = entityPlayer.getHeldItem(hand);
|
||||
final ItemStack itemStackHeld = entityPlayer.getHeldItem(enumHand);
|
||||
if (itemStackHeld.isEmpty()) {
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
|
@ -111,8 +111,7 @@ public class ItemBlockHullSlab extends ItemBlockHull {
|
|||
}
|
||||
|
||||
// try to place ignoring the existing block
|
||||
@SuppressWarnings("deprecation")
|
||||
final IBlockState blockStatePlaced = blockSlab.getStateForPlacement(world, blockPosSide, facing, hitX, hitY, hitZ, metadataItem, entityPlayer);
|
||||
final IBlockState blockStatePlaced = blockSlab.getStateForPlacement(world, blockPosSide, facing, hitX, hitY, hitZ, metadataItem, entityPlayer, enumHand);
|
||||
final EnumFacing enumFacingPlaced = blockStatePlaced.getValue(BlockHullSlab.VARIANT).getFacing().getOpposite();
|
||||
|
||||
// try to merge slabs when right-clicking on a side block
|
||||
|
@ -153,7 +152,7 @@ public class ItemBlockHullSlab extends ItemBlockHull {
|
|||
}
|
||||
}
|
||||
|
||||
return super.onItemUse(entityPlayer, world, blockPos, hand, facing, hitX, hitY, hitZ);
|
||||
return super.onItemUse(entityPlayer, world, blockPos, enumHand, facing, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,9 @@ public class BlockLift extends BlockAbstractContainer {
|
|||
|
||||
setTranslationKey("warpdrive.movement.lift");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumLiftMode.INACTIVE));
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(MODE, EnumLiftMode.INACTIVE)
|
||||
);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -30,10 +30,11 @@ public class BlockTransporterContainment extends BlockAbstractBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube(final IBlockState state, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
public boolean isNormalCube(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isSideSolid(final IBlockState blockState, @Nonnull final IBlockAccess blockAccess, @Nonnull final BlockPos blockPos, final EnumFacing side) {
|
||||
return side == EnumFacing.DOWN;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BlockTransporterScanner extends BlockAbstractBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube(final IBlockState state, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
public boolean isNormalCube(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -181,10 +181,6 @@ public class TileEntityShipController extends TileEntityAbstractShipController {
|
|||
return new Object[] { tileEntityShipCore.dim_negative(arguments) };
|
||||
}
|
||||
|
||||
// public Object[] command(final Object[] arguments);
|
||||
|
||||
// public Object[] enable(final Object[] arguments);
|
||||
|
||||
@Override
|
||||
public Object[] energy() {
|
||||
final TileEntityShipCore tileEntityShipCore = tileEntityShipCoreWeakReference == null ? null : tileEntityShipCoreWeakReference.get();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockLaserCamera extends BlockAbstractContainer {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean causesSuffocation(final IBlockState state) {
|
||||
public boolean causesSuffocation(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -110,7 +110,7 @@ public class CompatCarpentersBlocks implements IBlockTransformer {
|
|||
|
||||
if (blockCarpentersBed.isInstance(block)) {
|
||||
final int metadataNBT = nbtTileEntity.getInteger("cbMetadata");
|
||||
final int rotation = (metadataNBT >> 13) & 7;
|
||||
final int rotation = (metadataNBT >> 13) & 0x7;
|
||||
final int state = metadataNBT & 0x1FFF;
|
||||
switch (rotationSteps) {
|
||||
case 1:
|
||||
|
@ -150,7 +150,7 @@ public class CompatCarpentersBlocks implements IBlockTransformer {
|
|||
|
||||
if (blockCarpentersCollapsibleBlock.isInstance(block)) {
|
||||
final int metadataNBT = nbtTileEntity.getInteger("cbMetadata");
|
||||
final int state = metadataNBT & 7;
|
||||
final int state = metadataNBT & 0x7;
|
||||
final int weightXPZP = (metadataNBT & 0x7FFF07) >> 3;
|
||||
final int weightXNZP = (metadataNBT & 0x7C1FFF) >> 13;
|
||||
final int weightXNZN = (metadataNBT & 0x03FFFF) >> 18;
|
||||
|
@ -192,7 +192,7 @@ public class CompatCarpentersBlocks implements IBlockTransformer {
|
|||
|
||||
if (blockCarpentersGarageDoor.isInstance(block)) {
|
||||
final int metadataNBT = nbtTileEntity.getInteger("cbMetadata");
|
||||
final int rotation = (metadataNBT >> 4) & 7;
|
||||
final int rotation = (metadataNBT >> 4) & 0x7;
|
||||
final int state = metadataNBT & 0xFF8F;
|
||||
switch (rotationSteps) {
|
||||
case 1:
|
||||
|
@ -211,7 +211,7 @@ public class CompatCarpentersBlocks implements IBlockTransformer {
|
|||
|
||||
if (blockCarpentersGate.isInstance(block)) {
|
||||
final int metadataNBT = nbtTileEntity.getInteger("cbMetadata");
|
||||
final int rotation = (metadataNBT >> 4) & 7;
|
||||
final int rotation = (metadataNBT >> 4) & 0x7;
|
||||
final int state = metadataNBT & 0xFF8F;
|
||||
switch (rotationSteps) {
|
||||
case 1:
|
||||
|
|
|
@ -139,11 +139,11 @@ public class CompatWarpDrive implements IBlockTransformer {
|
|||
|| block instanceof BlockShipCore ) {
|
||||
switch (rotationSteps) {
|
||||
case 1:
|
||||
return mrotDirection[metadata & 7] | (metadata & 8);
|
||||
return mrotDirection[metadata & 0x7] | (metadata & 0x8);
|
||||
case 2:
|
||||
return mrotDirection[mrotDirection[metadata & 7]] | (metadata & 8);
|
||||
return mrotDirection[mrotDirection[metadata & 0x7]] | (metadata & 0x8);
|
||||
case 3:
|
||||
return mrotDirection[mrotDirection[mrotDirection[metadata & 7]]] | (metadata & 8);
|
||||
return mrotDirection[mrotDirection[mrotDirection[metadata & 0x7]]] | (metadata & 0x8);
|
||||
default:
|
||||
return metadata;
|
||||
}
|
||||
|
|
|
@ -80,22 +80,22 @@ public class WarpDriveConfig {
|
|||
|
||||
private static final boolean unused = false; // TODO
|
||||
|
||||
private static String stringConfigDirectory;
|
||||
private static File configDirectory;
|
||||
private static String stringConfigDirectory;
|
||||
private static File configDirectory;
|
||||
private static DocumentBuilder xmlDocumentBuilder;
|
||||
private static final String[] defaultXML_fillers = {
|
||||
private static final String[] defaultXML_fillers = {
|
||||
"filler-default.xml",
|
||||
"filler-netherores.xml",
|
||||
"filler-undergroundbiomes.xml",
|
||||
};
|
||||
private static final String[] defaultXML_loots = {
|
||||
private static final String[] defaultXML_loots = {
|
||||
"loot-default.xml",
|
||||
};
|
||||
private static final String[] defaultXML_structures = {
|
||||
private static final String[] defaultXML_structures = {
|
||||
"structures-default.xml",
|
||||
"structures-netherores.xml",
|
||||
};
|
||||
private static final String[] defaultXML_celestialObjects = {
|
||||
private static final String[] defaultXML_celestialObjects = {
|
||||
"celestialObjects-default.xml"
|
||||
};
|
||||
|
||||
|
@ -105,58 +105,58 @@ public class WarpDriveConfig {
|
|||
/*
|
||||
* The variables which store whether or not individual mods are loaded
|
||||
*/
|
||||
public static boolean isAdvancedRepulsionSystemLoaded = false;
|
||||
public static boolean isAdvancedSolarPanelLoaded = false;
|
||||
public static boolean isCoFHCoreLoaded = false;
|
||||
public static boolean isComputerCraftLoaded = false;
|
||||
public static boolean isDefenseTechLoaded = false;
|
||||
public static boolean isEnderIOLoaded = false;
|
||||
public static boolean isForgeMultipartLoaded = false;
|
||||
public static boolean isGregTechLoaded = false;
|
||||
public static boolean isICBMClassicLoaded = false;
|
||||
public static boolean isImmersiveEngineeringLoaded = false;
|
||||
public static boolean isIndustrialCraft2Loaded = false;
|
||||
public static boolean isNotEnoughItemsLoaded = false;
|
||||
public static boolean isOpenComputersLoaded = false;
|
||||
public static boolean isThermalExpansionLoaded = false;
|
||||
public static boolean isThermalFoundationLoaded = false;
|
||||
public static boolean isAdvancedRepulsionSystemLoaded = false;
|
||||
public static boolean isAdvancedSolarPanelLoaded = false;
|
||||
public static boolean isCoFHCoreLoaded = false;
|
||||
public static boolean isComputerCraftLoaded = false;
|
||||
public static boolean isDefenseTechLoaded = false;
|
||||
public static boolean isEnderIOLoaded = false;
|
||||
public static boolean isForgeMultipartLoaded = false;
|
||||
public static boolean isGregTechLoaded = false;
|
||||
public static boolean isICBMClassicLoaded = false;
|
||||
public static boolean isImmersiveEngineeringLoaded = false;
|
||||
public static boolean isIndustrialCraft2Loaded = false;
|
||||
public static boolean isNotEnoughItemsLoaded = false;
|
||||
public static boolean isOpenComputersLoaded = false;
|
||||
public static boolean isThermalExpansionLoaded = false;
|
||||
public static boolean isThermalFoundationLoaded = false;
|
||||
|
||||
public static ItemStack IC2_compressedAir;
|
||||
public static ItemStack IC2_emptyCell;
|
||||
public static Block IC2_rubberWood;
|
||||
public static ItemStack IC2_Resin;
|
||||
public static Block CC_Computer, CC_peripheral, CCT_Turtle, CCT_Expanded, CCT_Advanced;
|
||||
public static ItemStack IC2_compressedAir;
|
||||
public static ItemStack IC2_emptyCell;
|
||||
public static Block IC2_rubberWood;
|
||||
public static ItemStack IC2_Resin;
|
||||
public static Block CC_Computer, CC_peripheral, CCT_Turtle, CCT_Expanded, CCT_Advanced;
|
||||
|
||||
// Mod configuration (see loadConfig() for comments/definitions)
|
||||
// General
|
||||
public static int G_SPACE_BIOME_ID = 95;
|
||||
public static int G_SPACE_PROVIDER_ID = 14;
|
||||
public static int G_HYPERSPACE_PROVIDER_ID = 15;
|
||||
public static int G_ENTITY_SPHERE_GENERATOR_ID = 241;
|
||||
public static int G_ENTITY_STAR_CORE_ID = 242;
|
||||
public static int G_ENTITY_CAMERA_ID = 243;
|
||||
public static int G_ENTITY_PARTICLE_BUNCH_ID = 244;
|
||||
public static int G_SPACE_BIOME_ID = 95;
|
||||
public static int G_SPACE_PROVIDER_ID = 14;
|
||||
public static int G_HYPERSPACE_PROVIDER_ID = 15;
|
||||
public static int G_ENTITY_SPHERE_GENERATOR_ID = 241;
|
||||
public static int G_ENTITY_STAR_CORE_ID = 242;
|
||||
public static int G_ENTITY_CAMERA_ID = 243;
|
||||
public static int G_ENTITY_PARTICLE_BUNCH_ID = 244;
|
||||
|
||||
public static final int LUA_SCRIPTS_NONE = 0;
|
||||
public static final int LUA_SCRIPTS_TEMPLATES = 1;
|
||||
public static final int LUA_SCRIPTS_ALL = 2;
|
||||
public static int G_LUA_SCRIPTS = LUA_SCRIPTS_ALL;
|
||||
public static String G_SCHEMALOCATION = "warpDrive_schematics";
|
||||
public static int G_BLOCKS_PER_TICK = 3500;
|
||||
public static boolean G_ENABLE_PROTECTION_CHECKS = true;
|
||||
public static final int LUA_SCRIPTS_NONE = 0;
|
||||
public static final int LUA_SCRIPTS_TEMPLATES = 1;
|
||||
public static final int LUA_SCRIPTS_ALL = 2;
|
||||
public static int G_LUA_SCRIPTS = LUA_SCRIPTS_ALL;
|
||||
public static String G_SCHEMALOCATION = "warpDrive_schematics";
|
||||
public static int G_BLOCKS_PER_TICK = 3500;
|
||||
public static boolean G_ENABLE_PROTECTION_CHECKS = true;
|
||||
|
||||
// Client
|
||||
public static float CLIENT_LOCATION_SCALE = 1.0F;
|
||||
public static String CLIENT_LOCATION_FORMAT_TITLE = "§l%1$s";
|
||||
public static int CLIENT_LOCATION_BACKGROUND_COLOR = Commons.colorARGBtoInt(64, 48, 48, 48);
|
||||
public static int CLIENT_LOCATION_TEXT_COLOR = Commons.colorARGBtoInt(230, 180, 180, 240);
|
||||
public static boolean CLIENT_LOCATION_HAS_SHADOW = true;
|
||||
public static float CLIENT_LOCATION_SCALE = 1.0F;
|
||||
public static String CLIENT_LOCATION_FORMAT_TITLE = "§l%1$s";
|
||||
public static int CLIENT_LOCATION_BACKGROUND_COLOR = Commons.colorARGBtoInt(64, 48, 48, 48);
|
||||
public static int CLIENT_LOCATION_TEXT_COLOR = Commons.colorARGBtoInt(230, 180, 180, 240);
|
||||
public static boolean CLIENT_LOCATION_HAS_SHADOW = true;
|
||||
public static EnumDisplayAlignment CLIENT_LOCATION_SCREEN_ALIGNMENT = EnumDisplayAlignment.MIDDLE_RIGHT;
|
||||
public static int CLIENT_LOCATION_SCREEN_OFFSET_X = 0;
|
||||
public static int CLIENT_LOCATION_SCREEN_OFFSET_Y = -20;
|
||||
public static int CLIENT_LOCATION_SCREEN_OFFSET_X = 0;
|
||||
public static int CLIENT_LOCATION_SCREEN_OFFSET_Y = -20;
|
||||
public static EnumDisplayAlignment CLIENT_LOCATION_TEXT_ALIGNMENT = EnumDisplayAlignment.TOP_RIGHT;
|
||||
public static float CLIENT_LOCATION_WIDTH_RATIO = 0.0F;
|
||||
public static int CLIENT_LOCATION_WIDTH_MIN = 90;
|
||||
public static float CLIENT_LOCATION_WIDTH_RATIO = 0.0F;
|
||||
public static int CLIENT_LOCATION_WIDTH_MIN = 90;
|
||||
|
||||
public static EnumTooltipCondition CLIENT_TOOLTIP_REGISTRY_NAME = EnumTooltipCondition.ADVANCED_TOOLTIPS;
|
||||
public static EnumTooltipCondition CLIENT_TOOLTIP_ORE_DICTIONARY_NAME = EnumTooltipCondition.ALWAYS;
|
||||
|
@ -204,95 +204,95 @@ public class WarpDriveConfig {
|
|||
public static boolean LOGGING_CLIENT_SYNCHRONIZATION = false;
|
||||
|
||||
// Starmap
|
||||
public static int STARMAP_REGISTRY_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static boolean STARMAP_ALLOW_OVERLAPPING_CELESTIAL_OBJECTS = false;
|
||||
public static int STARMAP_REGISTRY_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static boolean STARMAP_ALLOW_OVERLAPPING_CELESTIAL_OBJECTS = false;
|
||||
|
||||
// Space generator
|
||||
public static int SPACE_GENERATOR_Y_MIN_CENTER = 55;
|
||||
public static int SPACE_GENERATOR_Y_MAX_CENTER = 128;
|
||||
public static int SPACE_GENERATOR_Y_MIN_BORDER = 5;
|
||||
public static int SPACE_GENERATOR_Y_MAX_BORDER = 200;
|
||||
public static int SPACE_GENERATOR_Y_MIN_CENTER = 55;
|
||||
public static int SPACE_GENERATOR_Y_MAX_CENTER = 128;
|
||||
public static int SPACE_GENERATOR_Y_MIN_BORDER = 5;
|
||||
public static int SPACE_GENERATOR_Y_MAX_BORDER = 200;
|
||||
|
||||
// Ship movement costs
|
||||
public static ShipMovementCosts.Factors[] SHIP_MOVEMENT_COSTS_FACTORS = null;
|
||||
|
||||
// Ship
|
||||
public static int[] SHIP_MAX_ENERGY_STORED_BY_TIER = { 0, 500000, 10000000, 100000000 };
|
||||
public static int[] SHIP_MASS_MAX_BY_TIER = { 2000000, 4000, 16000, 64000 };
|
||||
public static int[] SHIP_MASS_MIN_BY_TIER = { 0, 0, 3000, 12000 };
|
||||
public static int SHIP_MASS_MAX_ON_PLANET_SURFACE = 1200;
|
||||
public static int SHIP_MASS_MIN_FOR_HYPERSPACE = 3000;
|
||||
public static int[] SHIP_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 32, 64, 127 };
|
||||
public static int SHIP_COLLISION_TOLERANCE_BLOCKS = 3;
|
||||
public static int SHIP_WARMUP_RANDOM_TICKS = 60;
|
||||
public static int SHIP_CONTROLLER_UPDATE_INTERVAL_SECONDS = 2;
|
||||
public static int SHIP_CORE_ISOLATION_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static int SHIP_VOLUME_SCAN_BLOCKS_PER_TICK = 1000;
|
||||
public static int SHIP_VOLUME_SCAN_AGE_TOLERANCE_SECONDS = 120;
|
||||
public static String[] SHIP_MASS_UNLIMITED_PLAYER_NAMES = { "notch", "someone" };
|
||||
public static int[] SHIP_MAX_ENERGY_STORED_BY_TIER = { 0, 500000, 10000000, 100000000 };
|
||||
public static int[] SHIP_MASS_MAX_BY_TIER = { 2000000, 4000, 16000, 64000 };
|
||||
public static int[] SHIP_MASS_MIN_BY_TIER = { 0, 0, 3000, 12000 };
|
||||
public static int SHIP_MASS_MAX_ON_PLANET_SURFACE = 1200;
|
||||
public static int SHIP_MASS_MIN_FOR_HYPERSPACE = 3000;
|
||||
public static int[] SHIP_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 32, 64, 127 };
|
||||
public static int SHIP_COLLISION_TOLERANCE_BLOCKS = 3;
|
||||
public static int SHIP_WARMUP_RANDOM_TICKS = 60;
|
||||
public static int SHIP_CONTROLLER_UPDATE_INTERVAL_SECONDS = 2;
|
||||
public static int SHIP_CORE_ISOLATION_UPDATE_INTERVAL_SECONDS = 10;
|
||||
public static int SHIP_VOLUME_SCAN_BLOCKS_PER_TICK = 1000;
|
||||
public static int SHIP_VOLUME_SCAN_AGE_TOLERANCE_SECONDS = 120;
|
||||
public static String[] SHIP_MASS_UNLIMITED_PLAYER_NAMES = { "notch", "someone" };
|
||||
|
||||
// Jump gate
|
||||
public static int[] JUMP_GATE_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 32, 64, 127 };
|
||||
public static int[] JUMP_GATE_SIZE_MAX_PER_SIDE_BY_TIER = { 127, 32, 64, 127 };
|
||||
|
||||
// Radar
|
||||
public static int RADAR_MAX_ENERGY_STORED = 100000000; // 100kk eU
|
||||
public static int RADAR_SCAN_MIN_ENERGY_COST = 10000;
|
||||
public static double[] RADAR_SCAN_ENERGY_COST_FACTORS = { 0.0, 0.0, 0.0, 0.0001 };
|
||||
public static int RADAR_SCAN_MIN_DELAY_SECONDS = 1;
|
||||
public static double[] RADAR_SCAN_DELAY_FACTORS_SECONDS = { 1.0, 0.001, 0.0, 0.0 };
|
||||
public static int RADAR_MAX_ISOLATION_RANGE = 2;
|
||||
public static int RADAR_MIN_ISOLATION_BLOCKS = 2;
|
||||
public static int RADAR_MAX_ISOLATION_BLOCKS = 16;
|
||||
public static double RADAR_MIN_ISOLATION_EFFECT = 0.12;
|
||||
public static double RADAR_MAX_ISOLATION_EFFECT = 1.00;
|
||||
public static int RADAR_MAX_ENERGY_STORED = 100000000; // 100kk eU
|
||||
public static int RADAR_SCAN_MIN_ENERGY_COST = 10000;
|
||||
public static double[] RADAR_SCAN_ENERGY_COST_FACTORS = { 0.0, 0.0, 0.0, 0.0001 };
|
||||
public static int RADAR_SCAN_MIN_DELAY_SECONDS = 1;
|
||||
public static double[] RADAR_SCAN_DELAY_FACTORS_SECONDS = { 1.0, 0.001, 0.0, 0.0 };
|
||||
public static int RADAR_MAX_ISOLATION_RANGE = 2;
|
||||
public static int RADAR_MIN_ISOLATION_BLOCKS = 2;
|
||||
public static int RADAR_MAX_ISOLATION_BLOCKS = 16;
|
||||
public static double RADAR_MIN_ISOLATION_EFFECT = 0.12;
|
||||
public static double RADAR_MAX_ISOLATION_EFFECT = 1.00;
|
||||
|
||||
// Siren
|
||||
public static float[] SIREN_RANGE_BLOCKS_BY_TIER = { 0.0F, 32.0F, 64.0F, 128.0F };
|
||||
public static float[] SIREN_RANGE_BLOCKS_BY_TIER = { 0.0F, 32.0F, 64.0F, 128.0F };
|
||||
|
||||
// Ship Scanner
|
||||
public static int SS_MAX_DEPLOY_RADIUS_BLOCKS = 50;
|
||||
public static int SS_SEARCH_INTERVAL_TICKS = 20;
|
||||
public static int SS_SCAN_BLOCKS_PER_SECOND = 10;
|
||||
public static int SS_DEPLOY_BLOCKS_PER_INTERVAL = 10;
|
||||
public static int SS_DEPLOY_INTERVAL_TICKS = 4;
|
||||
public static int SS_MAX_DEPLOY_RADIUS_BLOCKS = 50;
|
||||
public static int SS_SEARCH_INTERVAL_TICKS = 20;
|
||||
public static int SS_SCAN_BLOCKS_PER_SECOND = 10;
|
||||
public static int SS_DEPLOY_BLOCKS_PER_INTERVAL = 10;
|
||||
public static int SS_DEPLOY_INTERVAL_TICKS = 4;
|
||||
|
||||
// Laser medium
|
||||
public static int[] LASER_MEDIUM_MAX_ENERGY_STORED_BY_TIER = { 1000000, 10000, 30000, 100000 };
|
||||
public static int[] LASER_MEDIUM_MAX_ENERGY_STORED_BY_TIER = { 1000000, 10000, 30000, 100000 };
|
||||
|
||||
// Laser Emitter
|
||||
// 1 main laser + 4 boosting lasers = 10 * 100k + 0.6 * 40 * 100k = 3.4M
|
||||
public static int LASER_CANNON_MAX_MEDIUMS_COUNT = 10;
|
||||
public static int LASER_CANNON_MAX_LASER_ENERGY = 3400000;
|
||||
public static int LASER_CANNON_EMIT_FIRE_DELAY_TICKS = 5;
|
||||
public static int LASER_CANNON_EMIT_SCAN_DELAY_TICKS = 1;
|
||||
public static int LASER_CANNON_MAX_MEDIUMS_COUNT = 10;
|
||||
public static int LASER_CANNON_MAX_LASER_ENERGY = 3400000;
|
||||
public static int LASER_CANNON_EMIT_FIRE_DELAY_TICKS = 5;
|
||||
public static int LASER_CANNON_EMIT_SCAN_DELAY_TICKS = 1;
|
||||
|
||||
public static double LASER_CANNON_BOOSTER_BEAM_ENERGY_EFFICIENCY = 0.60D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_AIR_BLOCK = 0.000200D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_VOID_BLOCK = 0.000005D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_BROKEN_BLOCK = 0.23D;
|
||||
public static int LASER_CANNON_RANGE_MAX = 500;
|
||||
public static double LASER_CANNON_BOOSTER_BEAM_ENERGY_EFFICIENCY = 0.60D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_AIR_BLOCK = 0.000200D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_VOID_BLOCK = 0.000005D;
|
||||
public static double LASER_CANNON_ENERGY_ATTENUATION_PER_BROKEN_BLOCK = 0.23D;
|
||||
public static int LASER_CANNON_RANGE_MAX = 500;
|
||||
|
||||
public static int LASER_CANNON_ENTITY_HIT_SET_ON_FIRE_SECONDS = 20;
|
||||
public static int LASER_CANNON_ENTITY_HIT_ENERGY = 15000;
|
||||
public static int LASER_CANNON_ENTITY_HIT_BASE_DAMAGE = 3;
|
||||
public static int LASER_CANNON_ENTITY_HIT_ENERGY_PER_DAMAGE = 30000;
|
||||
public static int LASER_CANNON_ENTITY_HIT_MAX_DAMAGE = 100;
|
||||
public static int LASER_CANNON_ENTITY_HIT_SET_ON_FIRE_SECONDS = 20;
|
||||
public static int LASER_CANNON_ENTITY_HIT_ENERGY = 15000;
|
||||
public static int LASER_CANNON_ENTITY_HIT_BASE_DAMAGE = 3;
|
||||
public static int LASER_CANNON_ENTITY_HIT_ENERGY_PER_DAMAGE = 30000;
|
||||
public static int LASER_CANNON_ENTITY_HIT_MAX_DAMAGE = 100;
|
||||
|
||||
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_THRESHOLD = 900000;
|
||||
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_BASE_STRENGTH = 4.0F;
|
||||
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
|
||||
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_MAX_STRENGTH = 4.0F;
|
||||
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_THRESHOLD = 900000;
|
||||
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_BASE_STRENGTH = 4.0F;
|
||||
public static int LASER_CANNON_ENTITY_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
|
||||
public static float LASER_CANNON_ENTITY_HIT_EXPLOSION_MAX_STRENGTH = 4.0F;
|
||||
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MIN = 75000;
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_PER_BLOCK_HARDNESS = 150000;
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MAX = 750000;
|
||||
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_PER_BLOCK_HARDNESS = 0.01;
|
||||
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_MAX = 0.80;
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MIN = 75000;
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_PER_BLOCK_HARDNESS = 150000;
|
||||
public static int LASER_CANNON_BLOCK_HIT_ENERGY_MAX = 750000;
|
||||
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_PER_BLOCK_HARDNESS = 0.01;
|
||||
public static double LASER_CANNON_BLOCK_HIT_ABSORPTION_MAX = 0.80;
|
||||
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_HARDNESS_THRESHOLD = 5.0F;
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_BASE_STRENGTH = 8.0F;
|
||||
public static int LASER_CANNON_BLOCK_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_MAX_STRENGTH = 50F;
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_HARDNESS_THRESHOLD = 5.0F;
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_BASE_STRENGTH = 8.0F;
|
||||
public static int LASER_CANNON_BLOCK_HIT_EXPLOSION_ENERGY_PER_STRENGTH = 125000;
|
||||
public static float LASER_CANNON_BLOCK_HIT_EXPLOSION_MAX_STRENGTH = 50F;
|
||||
|
||||
// Mining laser
|
||||
// BuildCraft quarry values for reference
|
||||
|
@ -308,143 +308,143 @@ public class WarpDriveConfig {
|
|||
// - overall consumption in 'all, space' is ML_EU_PER_LAYER_SPACE + ((ML_MAX_RADIUS * 2 + 1) ^ 2) * ML_EU_PER_BLOCK_SPACE => ~ 43150 EU/layer
|
||||
// - overall consumption in 'ores, space' is ML_EU_PER_LAYER_SPACE + ((ML_MAX_RADIUS * 2 + 1) ^ 2) * ML_EU_PER_BLOCK_SPACE * ML_EU_MUL_ORESONLY / 25 => ~ 28630 EU/layer
|
||||
// - at radius 5, one layer takes 403 ticks (2 * ML_SCAN_DELAY_TICKS + ML_MINE_DELAY_TICKS * (ML_MAX_RADIUS * 2 + 1) ^ 2)
|
||||
public static int MINING_LASER_MAX_MEDIUMS_COUNT = 3;
|
||||
public static int MINING_LASER_RADIUS_NO_LASER_MEDIUM = 4;
|
||||
public static int MINING_LASER_RADIUS_PER_LASER_MEDIUM = 1;
|
||||
public static int MINING_LASER_WARMUP_DELAY_TICKS = 20;
|
||||
public static int MINING_LASER_SCAN_DELAY_TICKS = 20;
|
||||
public static int MINING_LASER_MINE_DELAY_TICKS = 3;
|
||||
public static int MINING_LASER_SPACE_ENERGY_PER_LAYER = 20000;
|
||||
public static int MINING_LASER_PLANET_ENERGY_PER_LAYER = 33000;
|
||||
public static int MINING_LASER_SPACE_ENERGY_PER_BLOCK = 1500;
|
||||
public static int MINING_LASER_PLANET_ENERGY_PER_BLOCK = 2500;
|
||||
public static double MINING_LASER_ORESONLY_ENERGY_FACTOR = 15.0; // lower value encourages to keep the land 'clean'
|
||||
public static double MINING_LASER_SILKTOUCH_ENERGY_FACTOR = 1.5;
|
||||
public static double MINING_LASER_SILKTOUCH_DEUTERIUM_L = 0.0;
|
||||
public static double MINING_LASER_FORTUNE_ENERGY_FACTOR = 1.5;
|
||||
public static int MINING_LASER_MAX_MEDIUMS_COUNT = 3;
|
||||
public static int MINING_LASER_RADIUS_NO_LASER_MEDIUM = 4;
|
||||
public static int MINING_LASER_RADIUS_PER_LASER_MEDIUM = 1;
|
||||
public static int MINING_LASER_WARMUP_DELAY_TICKS = 20;
|
||||
public static int MINING_LASER_SCAN_DELAY_TICKS = 20;
|
||||
public static int MINING_LASER_MINE_DELAY_TICKS = 3;
|
||||
public static int MINING_LASER_SPACE_ENERGY_PER_LAYER = 20000;
|
||||
public static int MINING_LASER_PLANET_ENERGY_PER_LAYER = 33000;
|
||||
public static int MINING_LASER_SPACE_ENERGY_PER_BLOCK = 1500;
|
||||
public static int MINING_LASER_PLANET_ENERGY_PER_BLOCK = 2500;
|
||||
public static double MINING_LASER_ORESONLY_ENERGY_FACTOR = 15.0; // lower value encourages to keep the land 'clean'
|
||||
public static double MINING_LASER_SILKTOUCH_ENERGY_FACTOR = 1.5;
|
||||
public static double MINING_LASER_SILKTOUCH_DEUTERIUM_L = 0.0;
|
||||
public static double MINING_LASER_FORTUNE_ENERGY_FACTOR = 1.5;
|
||||
|
||||
// Tree farm
|
||||
public static int TREE_FARM_MAX_MEDIUMS_COUNT = 5;
|
||||
public static int TREE_FARM_MAX_SCAN_RADIUS_NO_LASER_MEDIUM = 3;
|
||||
public static int TREE_FARM_MAX_SCAN_RADIUS_PER_LASER_MEDIUM = 2;
|
||||
public static int TREE_FARM_totalMaxRadius = 0;
|
||||
public static int TREE_FARM_MAX_LOG_DISTANCE = 8;
|
||||
public static int TREE_FARM_MAX_LOG_DISTANCE_PER_MEDIUM = 4;
|
||||
public static int TREE_FARM_MAX_MEDIUMS_COUNT = 5;
|
||||
public static int TREE_FARM_MAX_SCAN_RADIUS_NO_LASER_MEDIUM = 3;
|
||||
public static int TREE_FARM_MAX_SCAN_RADIUS_PER_LASER_MEDIUM = 2;
|
||||
public static int TREE_FARM_totalMaxRadius = 0;
|
||||
public static int TREE_FARM_MAX_LOG_DISTANCE = 8;
|
||||
public static int TREE_FARM_MAX_LOG_DISTANCE_PER_MEDIUM = 4;
|
||||
|
||||
// Cloaking
|
||||
public static int CLOAKING_MAX_ENERGY_STORED = 500000000;
|
||||
public static int CLOAKING_COIL_CAPTURE_BLOCKS = 5;
|
||||
public static int CLOAKING_MAX_FIELD_RADIUS = 63;
|
||||
public static int CLOAKING_TIER1_ENERGY_PER_BLOCK = 32;
|
||||
public static int CLOAKING_TIER2_ENERGY_PER_BLOCK = 128;
|
||||
public static int CLOAKING_FIELD_REFRESH_INTERVAL_SECONDS = 3;
|
||||
public static int CLOAKING_MAX_ENERGY_STORED = 500000000;
|
||||
public static int CLOAKING_COIL_CAPTURE_BLOCKS = 5;
|
||||
public static int CLOAKING_MAX_FIELD_RADIUS = 63;
|
||||
public static int CLOAKING_TIER1_ENERGY_PER_BLOCK = 32;
|
||||
public static int CLOAKING_TIER2_ENERGY_PER_BLOCK = 128;
|
||||
public static int CLOAKING_FIELD_REFRESH_INTERVAL_SECONDS = 3;
|
||||
|
||||
// Breathing
|
||||
public static int BREATHING_ENERGY_PER_CANISTER = 200;
|
||||
public static int[] BREATHING_ENERGY_PER_NEW_AIR_BLOCK_BY_TIER = { 0, 12, 180, 2610 };
|
||||
public static int[] BREATHING_ENERGY_PER_EXISTING_AIR_BLOCK_BY_TIER = { 0, 4, 60, 870 };
|
||||
public static int[] BREATHING_MAX_ENERGY_STORED_BY_TIER = { 0, 1400, 21000, 304500 }; // almost 6 mn of autonomy
|
||||
public static int BREATHING_AIR_GENERATION_TICKS = 40;
|
||||
public static int[] BREATHING_AIR_GENERATION_RANGE_BLOCKS_BY_TIER = { 200, 16, 48, 144 };
|
||||
public static int BREATHING_VOLUME_UPDATE_DEPTH_BLOCKS = 256;
|
||||
public static int BREATHING_AIR_SIMULATION_DELAY_TICKS = 30;
|
||||
public static final boolean BREATHING_AIR_BLOCK_DEBUG = false;
|
||||
public static boolean BREATHING_AIR_AT_ENTITY_DEBUG = false;
|
||||
public static int BREATHING_ENERGY_PER_CANISTER = 200;
|
||||
public static int[] BREATHING_ENERGY_PER_NEW_AIR_BLOCK_BY_TIER = { 0, 12, 180, 2610 };
|
||||
public static int[] BREATHING_ENERGY_PER_EXISTING_AIR_BLOCK_BY_TIER = { 0, 4, 60, 870 };
|
||||
public static int[] BREATHING_MAX_ENERGY_STORED_BY_TIER = { 0, 1400, 21000, 304500 }; // almost 6 mn of autonomy
|
||||
public static int BREATHING_AIR_GENERATION_TICKS = 40;
|
||||
public static int[] BREATHING_AIR_GENERATION_RANGE_BLOCKS_BY_TIER = { 200, 16, 48, 144 };
|
||||
public static int BREATHING_VOLUME_UPDATE_DEPTH_BLOCKS = 256;
|
||||
public static int BREATHING_AIR_SIMULATION_DELAY_TICKS = 30;
|
||||
public static final boolean BREATHING_AIR_BLOCK_DEBUG = false;
|
||||
public static boolean BREATHING_AIR_AT_ENTITY_DEBUG = false;
|
||||
|
||||
public static int BREATHING_AIR_TANK_BREATH_DURATION_TICKS = 300;
|
||||
public static int[] BREATHING_AIR_TANK_CAPACITY_BY_TIER = { 20, 32, 64, 128 };
|
||||
public static int BREATHING_AIR_TANK_BREATH_DURATION_TICKS = 300;
|
||||
public static int[] BREATHING_AIR_TANK_CAPACITY_BY_TIER = { 20, 32, 64, 128 };
|
||||
|
||||
// IC2 Reactor cooler
|
||||
public static int IC2_REACTOR_MAX_HEAT_STORED = 30000;
|
||||
public static int IC2_REACTOR_FOCUS_HEAT_TRANSFER_PER_TICK = 648;
|
||||
public static int IC2_REACTOR_COMPONENT_HEAT_TRANSFER_PER_TICK = 54;
|
||||
public static int IC2_REACTOR_REACTOR_HEAT_TRANSFER_PER_TICK = 54;
|
||||
public static int IC2_REACTOR_COOLING_PER_INTERVAL = 1080;
|
||||
public static double IC2_REACTOR_ENERGY_PER_HEAT = 2.0D;
|
||||
public static int IC2_REACTOR_COOLING_INTERVAL_TICKS = 10;
|
||||
public static int IC2_REACTOR_MAX_HEAT_STORED = 30000;
|
||||
public static int IC2_REACTOR_FOCUS_HEAT_TRANSFER_PER_TICK = 648;
|
||||
public static int IC2_REACTOR_COMPONENT_HEAT_TRANSFER_PER_TICK = 54;
|
||||
public static int IC2_REACTOR_REACTOR_HEAT_TRANSFER_PER_TICK = 54;
|
||||
public static int IC2_REACTOR_COOLING_PER_INTERVAL = 1080;
|
||||
public static double IC2_REACTOR_ENERGY_PER_HEAT = 2.0D;
|
||||
public static int IC2_REACTOR_COOLING_INTERVAL_TICKS = 10;
|
||||
|
||||
// Transporter
|
||||
public static int TRANSPORTER_MAX_ENERGY_STORED = 1000000;
|
||||
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_BONUS = TRANSPORTER_MAX_ENERGY_STORED / 2;
|
||||
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_MAX_QUANTITY = 8;
|
||||
public static int TRANSPORTER_SETUP_UPDATE_PARAMETERS_TICKS = 1 * 20;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_XZ_BLOCKS = 8;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_BELOW_BLOCKS = 3;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_ABOVE_BLOCKS = 1;
|
||||
public static int TRANSPORTER_RANGE_BASE_BLOCKS = 256;
|
||||
public static int TRANSPORTER_RANGE_UPGRADE_BLOCKS = 64;
|
||||
public static int TRANSPORTER_RANGE_UPGRADE_MAX_QUANTITY = 8;
|
||||
public static double[] TRANSPORTER_LOCKING_ENERGY_FACTORS = { 20.0, 3.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_FACTOR_PER_TICK = Math.pow(0.01D, 1.0D / 300.0D); // natural decay down to 1% over 300 ticks
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_IN_WILDERNESS = 0.25D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_AT_BEACON = 0.50D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_AT_TRANSPORTER = 1.00D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_BONUS_AT_MAX_ENERGY_FACTOR = 0.5D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_UPGRADE = 0.15D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_IN_WILDERNESS = 0.25D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_AT_BEACON = 0.75D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_AT_TRANSPORTER = 1.0D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_UPGRADE = 0.25D;
|
||||
public static int TRANSPORTER_LOCKING_SPEED_OPTIMAL_TICKS = 5 * 20;
|
||||
public static int TRANSPORTER_LOCKING_UPGRADE_MAX_QUANTITY = 2;
|
||||
public static int TRANSPORTER_JAMMED_COOLDOWN_TICKS = 2 * 20;
|
||||
public static double[] TRANSPORTER_ENERGIZING_ENERGY_FACTORS = { 10000.0, 1500.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
|
||||
public static double TRANSPORTER_ENERGIZING_MAX_ENERGY_FACTOR = 10.0D;
|
||||
public static int TRANSPORTER_ENERGIZING_FAILURE_MAX_DAMAGE = 5;
|
||||
public static double TRANSPORTER_ENERGIZING_SUCCESS_LOCK_BONUS = 0.20D;
|
||||
public static int TRANSPORTER_ENERGIZING_SUCCESS_MAX_DAMAGE = 100;
|
||||
public static double TRANSPORTER_ENERGIZING_LOCKING_LOST = 0.5D;
|
||||
public static int TRANSPORTER_ENERGIZING_CHARGING_TICKS = 3 * 20;
|
||||
public static int TRANSPORTER_ENERGIZING_COOLDOWN_TICKS = 10 * 20;
|
||||
public static double TRANSPORTER_ENERGIZING_ENTITY_MOVEMENT_TOLERANCE_BLOCKS = 1.0D;
|
||||
public static int TRANSPORTER_ENTITY_GRAB_RADIUS_BLOCKS = 2;
|
||||
public static int TRANSPORTER_FOCUS_SEARCH_RADIUS_BLOCKS = 2;
|
||||
public static int TRANSPORTER_BEACON_MAX_ENERGY_STORED = 60000;
|
||||
public static int TRANSPORTER_BEACON_ENERGY_PER_TICK = 60000 / (300 * 20); // 10 EU/t over 5 minutes
|
||||
public static int TRANSPORTER_BEACON_DEPLOYING_DELAY_TICKS = 20;
|
||||
public static int TRANSPORTER_MAX_ENERGY_STORED = 1000000;
|
||||
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_BONUS = TRANSPORTER_MAX_ENERGY_STORED / 2;
|
||||
public static int TRANSPORTER_ENERGY_STORED_UPGRADE_MAX_QUANTITY = 8;
|
||||
public static int TRANSPORTER_SETUP_UPDATE_PARAMETERS_TICKS = 1 * 20;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_XZ_BLOCKS = 8;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_BELOW_BLOCKS = 3;
|
||||
public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_ABOVE_BLOCKS = 1;
|
||||
public static int TRANSPORTER_RANGE_BASE_BLOCKS = 256;
|
||||
public static int TRANSPORTER_RANGE_UPGRADE_BLOCKS = 64;
|
||||
public static int TRANSPORTER_RANGE_UPGRADE_MAX_QUANTITY = 8;
|
||||
public static double[] TRANSPORTER_LOCKING_ENERGY_FACTORS = { 20.0, 3.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_FACTOR_PER_TICK = Math.pow(0.01D, 1.0D / 300.0D); // natural decay down to 1% over 300 ticks
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_IN_WILDERNESS = 0.25D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_AT_BEACON = 0.50D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_AT_TRANSPORTER = 1.00D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_BONUS_AT_MAX_ENERGY_FACTOR = 0.5D;
|
||||
public static double TRANSPORTER_LOCKING_STRENGTH_UPGRADE = 0.15D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_IN_WILDERNESS = 0.25D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_AT_BEACON = 0.75D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_AT_TRANSPORTER = 1.0D;
|
||||
public static double TRANSPORTER_LOCKING_SPEED_UPGRADE = 0.25D;
|
||||
public static int TRANSPORTER_LOCKING_SPEED_OPTIMAL_TICKS = 5 * 20;
|
||||
public static int TRANSPORTER_LOCKING_UPGRADE_MAX_QUANTITY = 2;
|
||||
public static int TRANSPORTER_JAMMED_COOLDOWN_TICKS = 2 * 20;
|
||||
public static double[] TRANSPORTER_ENERGIZING_ENERGY_FACTORS = { 10000.0, 1500.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) };
|
||||
public static double TRANSPORTER_ENERGIZING_MAX_ENERGY_FACTOR = 10.0D;
|
||||
public static int TRANSPORTER_ENERGIZING_FAILURE_MAX_DAMAGE = 5;
|
||||
public static double TRANSPORTER_ENERGIZING_SUCCESS_LOCK_BONUS = 0.20D;
|
||||
public static int TRANSPORTER_ENERGIZING_SUCCESS_MAX_DAMAGE = 100;
|
||||
public static double TRANSPORTER_ENERGIZING_LOCKING_LOST = 0.5D;
|
||||
public static int TRANSPORTER_ENERGIZING_CHARGING_TICKS = 3 * 20;
|
||||
public static int TRANSPORTER_ENERGIZING_COOLDOWN_TICKS = 10 * 20;
|
||||
public static double TRANSPORTER_ENERGIZING_ENTITY_MOVEMENT_TOLERANCE_BLOCKS = 1.0D;
|
||||
public static int TRANSPORTER_ENTITY_GRAB_RADIUS_BLOCKS = 2;
|
||||
public static int TRANSPORTER_FOCUS_SEARCH_RADIUS_BLOCKS = 2;
|
||||
public static int TRANSPORTER_BEACON_MAX_ENERGY_STORED = 60000;
|
||||
public static int TRANSPORTER_BEACON_ENERGY_PER_TICK = 60000 / (300 * 20); // 10 EU/t over 5 minutes
|
||||
public static int TRANSPORTER_BEACON_DEPLOYING_DELAY_TICKS = 20;
|
||||
|
||||
// Enantiomorphic power reactor
|
||||
public static int[] ENAN_REACTOR_MAX_ENERGY_STORED_BY_TIER = { 100000000, 100000000, 500000000, 2000000000 };
|
||||
public static final int ENAN_REACTOR_UPDATE_INTERVAL_TICKS = 5; // hardcoded in the equations,
|
||||
public static int ENAN_REACTOR_MAX_LASERS_PER_SECOND = 6;
|
||||
public static int[] ENAN_REACTOR_GENERATION_MIN_RF_BY_TIER = { 4, 4, 4, 4 };
|
||||
public static int[] ENAN_REACTOR_GENERATION_MAX_RF_BY_TIER = { 64000, 64000, 192000, 576000 };
|
||||
public static int[] ENAN_REACTOR_EXPLOSION_MAX_RADIUS_BY_TIER = { 6, 6, 8, 10 };
|
||||
public static double[] ENAN_REACTOR_EXPLOSION_MAX_REMOVAL_CHANCE_BY_TIER = { 0.1D, 0.1D, 0.1D, 0.1D };
|
||||
public static int[] ENAN_REACTOR_EXPLOSION_COUNT_BY_TIER = { 3, 3, 3, 3 };
|
||||
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MIN_BY_TIER = { 4.0F, 4.0F, 5.0F, 6.0F };
|
||||
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MAX_BY_TIER = { 7.0F, 7.0F, 9.0F, 11.0F };
|
||||
public static int[] ENAN_REACTOR_MAX_ENERGY_STORED_BY_TIER = { 100000000, 100000000, 500000000, 2000000000 };
|
||||
public static final int ENAN_REACTOR_UPDATE_INTERVAL_TICKS = 5; // hardcoded in the equations,
|
||||
public static int ENAN_REACTOR_MAX_LASERS_PER_SECOND = 6;
|
||||
public static int[] ENAN_REACTOR_GENERATION_MIN_RF_BY_TIER = { 4, 4, 4, 4 };
|
||||
public static int[] ENAN_REACTOR_GENERATION_MAX_RF_BY_TIER = { 64000, 64000, 192000, 576000 };
|
||||
public static int[] ENAN_REACTOR_EXPLOSION_MAX_RADIUS_BY_TIER = { 6, 6, 8, 10 };
|
||||
public static double[] ENAN_REACTOR_EXPLOSION_MAX_REMOVAL_CHANCE_BY_TIER = { 0.1D, 0.1D, 0.1D, 0.1D };
|
||||
public static int[] ENAN_REACTOR_EXPLOSION_COUNT_BY_TIER = { 3, 3, 3, 3 };
|
||||
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MIN_BY_TIER = { 4.0F, 4.0F, 5.0F, 6.0F };
|
||||
public static float[] ENAN_REACTOR_EXPLOSION_STRENGTH_MAX_BY_TIER = { 7.0F, 7.0F, 9.0F, 11.0F };
|
||||
|
||||
// Subspace capacitor
|
||||
public static int[] CAPACITOR_MAX_ENERGY_STORED_BY_TIER = { 20000000, 800000, 4000000, 20000000 };
|
||||
public static int[] CAPACITOR_IC2_SINK_TIER_BY_TIER = { Integer.MAX_VALUE, 2, 3, 4 };
|
||||
public static int[] CAPACITOR_IC2_SOURCE_TIER_BY_TIER = { 20, 2, 3, 4 };
|
||||
public static int[] CAPACITOR_TRANSFER_PER_TICK_BY_TIER = { Integer.MAX_VALUE / 2, 200, 1000, 5000 };
|
||||
public static double[] CAPACITOR_EFFICIENCY_PER_UPGRADE = { 0.95D, 0.98D, 1.0D };
|
||||
public static int[] CAPACITOR_MAX_ENERGY_STORED_BY_TIER = { 20000000, 800000, 4000000, 20000000 };
|
||||
public static int[] CAPACITOR_IC2_SINK_TIER_BY_TIER = { Integer.MAX_VALUE, 2, 3, 4 };
|
||||
public static int[] CAPACITOR_IC2_SOURCE_TIER_BY_TIER = { 20, 2, 3, 4 };
|
||||
public static int[] CAPACITOR_TRANSFER_PER_TICK_BY_TIER = { Integer.MAX_VALUE / 2, 200, 1000, 5000 };
|
||||
public static double[] CAPACITOR_EFFICIENCY_PER_UPGRADE = { 0.95D, 0.98D, 1.0D };
|
||||
|
||||
// Laser lift
|
||||
public static int LIFT_MAX_ENERGY_STORED = 900;
|
||||
public static int LIFT_ENERGY_PER_ENTITY = 150;
|
||||
public static int LIFT_UPDATE_INTERVAL_TICKS = 10;
|
||||
public static int LIFT_ENTITY_COOLDOWN_TICKS = 40;
|
||||
public static int LIFT_MAX_ENERGY_STORED = 900;
|
||||
public static int LIFT_ENERGY_PER_ENTITY = 150;
|
||||
public static int LIFT_UPDATE_INTERVAL_TICKS = 10;
|
||||
public static int LIFT_ENTITY_COOLDOWN_TICKS = 40;
|
||||
|
||||
// Chunk loader
|
||||
public static int CHUNK_LOADER_MAX_ENERGY_STORED = 1000000;
|
||||
public static int CHUNK_LOADER_MAX_RADIUS = 2;
|
||||
public static int CHUNK_LOADER_ENERGY_PER_CHUNK = 8;
|
||||
public static int CHUNK_LOADER_MAX_ENERGY_STORED = 1000000;
|
||||
public static int CHUNK_LOADER_MAX_RADIUS = 2;
|
||||
public static int CHUNK_LOADER_ENERGY_PER_CHUNK = 8;
|
||||
|
||||
// Hull
|
||||
public static float[] HULL_HARDNESS = { 666666.0F, 25.0F, 50.0F, 80.0F };
|
||||
public static float[] HULL_BLAST_RESISTANCE = { 666666.0F, 60.0F, 90.0F, 120.0F };
|
||||
public static float[] HULL_HARDNESS = { 666666.0F, 25.0F, 50.0F, 80.0F };
|
||||
public static float[] HULL_BLAST_RESISTANCE = { 666666.0F, 60.0F, 90.0F, 120.0F };
|
||||
|
||||
// Block transformers library
|
||||
public static HashMap<String, IBlockTransformer> blockTransformers = new HashMap<>(30);
|
||||
|
||||
// Particles accelerator
|
||||
public static boolean ACCELERATOR_ENABLE = false;
|
||||
public static final double[] ACCELERATOR_TEMPERATURES_K = { 270.0, 200.0, 7.0 };
|
||||
public static final double ACCELERATOR_THRESHOLD_DEFAULT = 0.95D;
|
||||
public static int ACCELERATOR_MAX_PARTICLE_BUNCHES = 20;
|
||||
public static boolean ACCELERATOR_ENABLE = false;
|
||||
public static final double[] ACCELERATOR_TEMPERATURES_K = { 270.0, 200.0, 7.0 };
|
||||
public static final double ACCELERATOR_THRESHOLD_DEFAULT = 0.95D;
|
||||
public static int ACCELERATOR_MAX_PARTICLE_BUNCHES = 20;
|
||||
|
||||
@Nonnull
|
||||
public static Block getBlockOrFire(@Nonnull final String registryName) {
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class OrbInstance extends AbstractStructureInstance {
|
||||
|
||||
protected OrbShell[] orbShells;
|
||||
protected int[] orbShellThicknesses;
|
||||
protected int totalThickness;
|
||||
|
|
|
@ -121,12 +121,12 @@ public class VectorI implements Cloneable {
|
|||
return true;
|
||||
}
|
||||
|
||||
public IBlockState getBlockState_noChunkLoading(final IBlockAccess world, final EnumFacing side) {
|
||||
return getBlockState_noChunkLoading(world, x + side.getXOffset(), y + side.getYOffset(), z + side.getZOffset());
|
||||
public IBlockState getBlockState_noChunkLoading(final IBlockAccess blockAccess, final EnumFacing side) {
|
||||
return getBlockState_noChunkLoading(blockAccess, x + side.getXOffset(), y + side.getYOffset(), z + side.getZOffset());
|
||||
}
|
||||
|
||||
public IBlockState getBlockState_noChunkLoading(final IBlockAccess world) {
|
||||
return getBlockState_noChunkLoading(world, x, y, z);
|
||||
public IBlockState getBlockState_noChunkLoading(final IBlockAccess blockAccess) {
|
||||
return getBlockState_noChunkLoading(blockAccess, x, y, z);
|
||||
}
|
||||
|
||||
static public IBlockState getBlockState_noChunkLoading(final IBlockAccess blockAccess, final int x, final int y, final int z) {
|
||||
|
@ -141,8 +141,8 @@ public class VectorI implements Cloneable {
|
|||
return blockAccess.getBlockState(new BlockPos(x, y, z));
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity(final IBlockAccess world) {
|
||||
return world.getTileEntity(new BlockPos(x, y, z));
|
||||
public TileEntity getTileEntity(final IBlockAccess blockAccess) {
|
||||
return blockAccess.getTileEntity(new BlockPos(x, y, z));
|
||||
}
|
||||
|
||||
public void setBlockState(final World world, final IBlockState blockState) {
|
||||
|
|
|
@ -94,6 +94,7 @@ public class ClientHandler {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void addBlockDetails(final ItemTooltipEvent event, final Block block) {
|
||||
// item registry name
|
||||
final ResourceLocation registryNameItem = event.getItemStack().getItem().getRegistryName();
|
||||
|
|
|
@ -30,13 +30,13 @@ public class ItemAirTank extends ItemAbstractBase implements IAirContainerItem {
|
|||
return;
|
||||
}
|
||||
list.add(new ItemStack(this, 1, 0));
|
||||
list.add(new ItemStack(this, 1, getMaxDamage()));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumRarity getRarity(@Nonnull final ItemStack itemStack) {
|
||||
return enumAirTankTier.getRarity();
|
||||
list.add(new ItemStack(this, 1, getMaxDamage(null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,7 +63,7 @@ public class ItemAirTank extends ItemAbstractBase implements IAirContainerItem {
|
|||
|| itemStack.getItem() != this ) {
|
||||
return 0;
|
||||
}
|
||||
return getMaxDamage() - itemStack.getItemDamage();
|
||||
return getMaxDamage(itemStack) - itemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,7 +72,7 @@ public class ItemAirTank extends ItemAbstractBase implements IAirContainerItem {
|
|||
|| itemStack.getItem() != this ) {
|
||||
return itemStack;
|
||||
}
|
||||
itemStack.setItemDamage(Math.min(getMaxDamage(), itemStack.getItemDamage() + 1)); // bypass unbreaking enchantment
|
||||
itemStack.setItemDamage(Math.min(getMaxDamage(itemStack), itemStack.getItemDamage() + 1)); // bypass unbreaking enchantment
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,10 +133,10 @@ public class ItemComponent extends ItemAbstractBase implements IAirContainerItem
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess world, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = world.getBlockState(blockPos).getBlock();
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess blockAccess, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = blockAccess.getBlockState(blockPos).getBlock();
|
||||
|
||||
return block instanceof BlockCapacitor
|
||||
|| super.doesSneakBypassUse(itemStack, world, blockPos, player);
|
||||
|| super.doesSneakBypassUse(itemStack, blockAccess, blockPos, player);
|
||||
}
|
||||
}
|
|
@ -92,9 +92,9 @@ public class ItemForceFieldShape extends ItemAbstractBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess world, final BlockPos blockPos, final EntityPlayer player) {
|
||||
Block block = world.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockForceFieldRelay || block instanceof BlockForceFieldProjector || super.doesSneakBypassUse(itemStack, world, blockPos, player);
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess blockAccess, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = blockAccess.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockForceFieldRelay || block instanceof BlockForceFieldProjector || super.doesSneakBypassUse(itemStack, blockAccess, blockPos, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -336,9 +336,9 @@ public class ItemTuningDriver extends ItemAbstractBase implements IWarpTool {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess world, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = world.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockCapacitor || super.doesSneakBypassUse(itemStack, world, blockPos, player);
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess blockAccess, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = blockAccess.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockCapacitor || super.doesSneakBypassUse(itemStack, blockAccess, blockPos, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -148,9 +148,9 @@ public class ItemTuningFork extends ItemAbstractBase implements IWarpTool {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess world, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = world.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockCapacitor || super.doesSneakBypassUse(itemStack, world, blockPos, player);
|
||||
public boolean doesSneakBypassUse(final ItemStack itemStack, final IBlockAccess blockAccess, final BlockPos blockPos, final EntityPlayer player) {
|
||||
final Block block = blockAccess.getBlockState(blockPos).getBlock();
|
||||
return block instanceof BlockCapacitor || super.doesSneakBypassUse(itemStack, blockAccess, blockPos, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,6 +28,7 @@ public class ItemWarpArmor extends ItemArmor implements IItemBase, IBreathingHel
|
|||
setTranslationKey("warpdrive.armor." + suffixes[entityEquipmentSlot.getIndex()]);
|
||||
setRegistryName(registryName);
|
||||
setCreativeTab(WarpDrive.creativeTabMain);
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue