Applied new mappings
This commit is contained in:
parent
d7189a7a75
commit
014e710990
124 changed files with 306 additions and 303 deletions
|
@ -138,11 +138,11 @@ public class Commons {
|
|||
public static Style styleWarning = new Style().setColor(TextFormatting.RED);
|
||||
|
||||
public static WarpDriveText getChatPrefix(final Block block) {
|
||||
return getChatPrefix(block.getUnlocalizedName() + ".name");
|
||||
return getChatPrefix(block.getTranslationKey() + ".name");
|
||||
}
|
||||
|
||||
public static WarpDriveText getChatPrefix(final ItemStack itemStack) {
|
||||
return getChatPrefix(itemStack.getUnlocalizedName() + ".name");
|
||||
return getChatPrefix(itemStack.getTranslationKey() + ".name");
|
||||
}
|
||||
|
||||
public static WarpDriveText getChatPrefix(final String translationKey) {
|
||||
|
@ -837,7 +837,7 @@ public class Commons {
|
|||
public static RayTraceResult getInteractingBlock(final World world, final EntityPlayer entityPlayer, final double distance) {
|
||||
final Vec3d vec3Position = new Vec3d(entityPlayer.posX, entityPlayer.posY + entityPlayer.eyeHeight, entityPlayer.posZ);
|
||||
final Vec3d vec3Look = entityPlayer.getLook(1.0F);
|
||||
final Vec3d vec3Target = vec3Position.addVector(vec3Look.x * distance, vec3Look.y * distance, vec3Look.z * distance);
|
||||
final Vec3d vec3Target = vec3Position.add(vec3Look.x * distance, vec3Look.y * distance, vec3Look.z * distance);
|
||||
return world.rayTraceBlocks(vec3Position, vec3Target, false, false, true);
|
||||
}
|
||||
|
||||
|
@ -866,20 +866,20 @@ public class Commons {
|
|||
for (final Fluid fluid : fluidsRegistry.values()) {
|
||||
final Block blockFluid = fluid.getBlock();
|
||||
if (blockFluid != null) {
|
||||
map.put(blockFluid.getUnlocalizedName(), fluid);
|
||||
map.put(blockFluid.getTranslationKey(), fluid);
|
||||
}
|
||||
}
|
||||
fluidByBlockName = map;
|
||||
}
|
||||
// final Fluid fluid = FluidRegistry.lookupFluidForBlock(blockState.getBlock()); @TODO MC1.10 fluid detection
|
||||
return fluidByBlockName.get(block.getUnlocalizedName());
|
||||
return fluidByBlockName.get(block.getTranslationKey());
|
||||
}
|
||||
|
||||
public static EnumFacing getDirection(final int index) {
|
||||
if (index < 0 || index > 5) {
|
||||
return null;
|
||||
}
|
||||
return EnumFacing.getFront(index);
|
||||
return EnumFacing.byIndex(index);
|
||||
}
|
||||
|
||||
public static int getOrdinal(final EnumFacing direction) {
|
||||
|
|
|
@ -71,17 +71,17 @@ public class Particle {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getLocalizedName() {
|
||||
final String unlocalizedName = getUnlocalizedName();
|
||||
final String unlocalizedName = getTranslationKey();
|
||||
return unlocalizedName == null ? "" : new TextComponentTranslation(unlocalizedName + ".name").getFormattedText();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getLocalizedTooltip() {
|
||||
final String unlocalizedName = getUnlocalizedName();
|
||||
final String unlocalizedName = getTranslationKey();
|
||||
return unlocalizedName == null ? "" : new TextComponentTranslation(unlocalizedName + ".tooltip").getFormattedText();
|
||||
}
|
||||
|
||||
public String getUnlocalizedName()
|
||||
public String getTranslationKey()
|
||||
{
|
||||
return "warpdrive.particle." + this.registryName;
|
||||
}
|
||||
|
|
|
@ -98,8 +98,8 @@ public class ParticleStack {
|
|||
return this.getParticle().getLocalizedName();
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
return this.getParticle().getUnlocalizedName();
|
||||
public String getTranslationKey() {
|
||||
return this.getParticle().getTranslationKey();
|
||||
}
|
||||
|
||||
public ParticleStack copy() {
|
||||
|
|
|
@ -30,7 +30,7 @@ public abstract class BlockAbstractRotatingContainer extends BlockAbstractContai
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ public class BlockChunkLoader extends BlockAbstractContainer {
|
|||
public BlockChunkLoader(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.machines.chunk_loader." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.machines.chunk_loader." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BlockLaser extends BlockAbstractContainer {
|
|||
|
||||
setHardness(50.0F);
|
||||
setResistance(20.0F * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.machines.laser");
|
||||
setTranslationKey("warpdrive.machines.laser");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -18,7 +18,7 @@ public class BlockLaserMedium extends BlockAbstractContainer {
|
|||
public BlockLaserMedium(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.machines.laser_medium." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.machines.laser_medium." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(LEVEL, 0));
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockSecurityStation extends BlockAbstractContainer {
|
|||
public BlockSecurityStation(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.machines.security_station");
|
||||
setTranslationKey("warpdrive.machines.security_station");
|
||||
|
||||
setDefaultState(getDefaultState());
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ItemBlockAbstractBase extends ItemBlock implements IItemBase {
|
|||
super(block);
|
||||
|
||||
setHasSubtypes(hasSubtypes);
|
||||
setUnlocalizedName(block.getUnlocalizedName());
|
||||
setTranslationKey(block.getTranslationKey());
|
||||
this.hasUniqueName = hasUniqueName;
|
||||
}
|
||||
|
||||
|
@ -54,14 +54,14 @@ public class ItemBlockAbstractBase extends ItemBlock implements IItemBase {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final ItemStack itemStack) {
|
||||
public String getTranslationKey(final ItemStack itemStack) {
|
||||
if ( hasUniqueName
|
||||
|| itemStack == null
|
||||
|| !(block instanceof BlockAbstractContainer)
|
||||
|| !((BlockAbstractContainer) block).hasSubBlocks ) {
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
return getUnlocalizedName() + itemStack.getItemDamage();
|
||||
return getTranslationKey() + itemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -119,12 +119,12 @@ public class ItemBlockAbstractBase extends ItemBlock implements IItemBase {
|
|||
@Nonnull final List<String> list, @Nullable final ITooltipFlag advancedItemTooltips) {
|
||||
super.addInformation(itemStack, world, list, advancedItemTooltips);
|
||||
|
||||
final String tooltipItemStack = getUnlocalizedName(itemStack) + ".tooltip";
|
||||
final String tooltipItemStack = getTranslationKey(itemStack) + ".tooltip";
|
||||
if (I18n.hasKey(tooltipItemStack)) {
|
||||
Commons.addTooltip(list, new TextComponentTranslation(tooltipItemStack).getFormattedText());
|
||||
}
|
||||
|
||||
final String tooltipName = getUnlocalizedName() + ".tooltip";
|
||||
final String tooltipName = getTranslationKey() + ".tooltip";
|
||||
if ((!tooltipItemStack.equals(tooltipName)) && I18n.hasKey(tooltipName)) {
|
||||
Commons.addTooltip(list, new TextComponentTranslation(tooltipName).getFormattedText());
|
||||
}
|
||||
|
@ -146,6 +146,6 @@ public class ItemBlockAbstractBase extends ItemBlock implements IItemBase {
|
|||
getClass().getSimpleName(),
|
||||
Integer.toHexString(hashCode()),
|
||||
REGISTRY.getNameForObject(this),
|
||||
getUnlocalizedName());
|
||||
getTranslationKey());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -504,9 +504,9 @@ public abstract class TileEntityAbstractBase extends TileEntity implements IBloc
|
|||
final Object key = entry.getKey();
|
||||
String keyName = key.toString();
|
||||
if (key instanceof Item) {
|
||||
keyName = ((Item) key).getUnlocalizedName();
|
||||
keyName = ((Item) key).getTranslationKey();
|
||||
} else if (key instanceof Block) {
|
||||
keyName = ((Block) key).getUnlocalizedName();
|
||||
keyName = ((Block) key).getTranslationKey();
|
||||
}
|
||||
if (entry.getValue() == 1) {
|
||||
message.append(keyName);
|
||||
|
|
|
@ -39,8 +39,8 @@ public abstract class TileEntityAbstractChunkLoading extends TileEntityAbstractE
|
|||
if ( chunkMin == null
|
||||
|| chunkMax == null ) {
|
||||
WarpDrive.logger.warn(String.format("%s No chunk coordinates defined, assuming current chunk", this));
|
||||
chunkMin = world.getChunkFromBlockCoords(pos).getPos();
|
||||
chunkMax = world.getChunkFromBlockCoords(pos).getPos();
|
||||
chunkMin = world.getChunk(pos).getPos();
|
||||
chunkMax = world.getChunk(pos).getPos();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,11 +115,11 @@ public abstract class TileEntityAbstractChunkLoading extends TileEntityAbstractE
|
|||
tagCompound = super.writeToNBT(tagCompound);
|
||||
|
||||
if (chunkMin == null) {
|
||||
chunkMin = world.getChunkFromBlockCoords(pos).getPos();
|
||||
chunkMin = world.getChunk(pos).getPos();
|
||||
}
|
||||
|
||||
if (chunkMax == null) {
|
||||
chunkMax = world.getChunkFromBlockCoords(pos).getPos();
|
||||
chunkMax = world.getChunk(pos).getPos();
|
||||
}
|
||||
|
||||
tagCompound.setInteger("minChunkX", chunkMin.x);
|
||||
|
|
|
@ -426,7 +426,7 @@ public abstract class TileEntityAbstractEnergy extends TileEntityAbstractMachine
|
|||
@Optional.Method(modid = "redstoneflux")
|
||||
private void CoFH_outputEnergy(final EnumFacing from, final IEnergyReceiver energyReceiver) {
|
||||
if ( energyReceiver == null
|
||||
|| world.getTileEntity(pos.add(from.getFrontOffsetX(), from.getFrontOffsetY(), from.getFrontOffsetZ())) == null ) {
|
||||
|| world.getTileEntity(pos.add(from.getXOffset(), from.getYOffset(), from.getZOffset())) == null ) {
|
||||
return;
|
||||
}
|
||||
if (!energy_canOutput(from)) {
|
||||
|
@ -510,7 +510,7 @@ public abstract class TileEntityAbstractEnergy extends TileEntityAbstractMachine
|
|||
for (final EnumFacing from : EnumFacing.VALUES) {
|
||||
boolean energyReceiverFound = false;
|
||||
if (canConnectEnergy(from)) {
|
||||
final TileEntity tileEntity = world.getTileEntity(pos.add(from.getFrontOffsetX(), from.getFrontOffsetY(), from.getFrontOffsetZ()));
|
||||
final TileEntity tileEntity = world.getTileEntity(pos.add(from.getXOffset(), from.getYOffset(), from.getZOffset()));
|
||||
if (tileEntity instanceof IEnergyReceiver) {
|
||||
IEnergyReceiver energyReceiver = (IEnergyReceiver) tileEntity;
|
||||
if (energyReceiver.canConnectEnergy(from.getOpposite())) {
|
||||
|
|
|
@ -190,9 +190,9 @@ public abstract class TileEntityAbstractLaser extends TileEntityAbstractMachine
|
|||
public Object[] laserMediumDirection() {
|
||||
return new Object[] {
|
||||
laserMedium_direction.name(),
|
||||
laserMedium_direction.getFrontOffsetX(),
|
||||
laserMedium_direction.getFrontOffsetY(),
|
||||
laserMedium_direction.getFrontOffsetZ() };
|
||||
laserMedium_direction.getXOffset(),
|
||||
laserMedium_direction.getYOffset(),
|
||||
laserMedium_direction.getZOffset() };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -145,7 +145,7 @@ public class TileEntityChunkLoader extends TileEntityAbstractChunkLoading {
|
|||
if (world == null) {
|
||||
return;
|
||||
}
|
||||
final ChunkPos chunkSelf = world.getChunkFromBlockCoords(pos).getPos();
|
||||
final ChunkPos chunkSelf = world.getChunk(pos).getPos();
|
||||
|
||||
chunkMin = new ChunkPos(chunkSelf.x + radiusXneg, chunkSelf.z + radiusZneg);
|
||||
chunkMax = new ChunkPos(chunkSelf.x + radiusXpos, chunkSelf.z + radiusZpos);
|
||||
|
|
|
@ -356,7 +356,7 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
|
|||
scanResult_type = ScanResultType.BLOCK;
|
||||
scanResult_position = mopResult.getBlockPos();
|
||||
final IBlockState blockState = world.getBlockState(scanResult_position);
|
||||
scanResult_blockUnlocalizedName = blockState.getBlock().getUnlocalizedName();
|
||||
scanResult_blockUnlocalizedName = blockState.getBlock().getTranslationKey();
|
||||
scanResult_blockMetadata = blockState.getBlock().getMetaFromState(blockState);
|
||||
scanResult_blockResistance = blockState.getBlock().getExplosionResistance(null);
|
||||
PacketHandler.sendBeamPacket(world, vSource, new Vector3(mopResult.hitVec), r, g, b, 50, energy, 200);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockAcceleratorControlPoint extends BlockAbstractAccelerator imple
|
|||
return;
|
||||
}
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.accelerator_control_point");
|
||||
setTranslationKey("warpdrive.atomic.accelerator_control_point");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
|
|
@ -17,7 +17,7 @@ public class BlockAcceleratorController extends BlockAbstractContainer {
|
|||
public BlockAcceleratorController(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.accelerator_controller");
|
||||
setTranslationKey("warpdrive.atomic.accelerator_controller");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockChiller extends BlockAbstractAccelerator {
|
|||
public BlockChiller(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.chiller." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.atomic.chiller." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
@ -67,8 +67,8 @@ public class BlockChiller extends BlockAbstractAccelerator {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(final World world, final BlockPos blockPos, final IBlockState blockState, final Entity entity) {
|
||||
super.onEntityCollidedWithBlock(world, blockPos, blockState, entity);
|
||||
public void onEntityCollision(final World world, final BlockPos blockPos, final IBlockState blockState, final Entity entity) {
|
||||
super.onEntityCollision(world, blockPos, blockState, entity);
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class BlockElectromagnetGlass extends BlockElectromagnetPlain {
|
|||
public BlockElectromagnetGlass(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.electromagnet." + enumTier.getName() + ".glass");
|
||||
setTranslationKey("warpdrive.atomic.electromagnet." + enumTier.getName() + ".glass");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -7,6 +7,6 @@ public class BlockElectromagnetPlain extends BlockAbstractAccelerator {
|
|||
public BlockElectromagnetPlain(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.electromagnet." + enumTier.getName() + ".plain");
|
||||
setTranslationKey("warpdrive.atomic.electromagnet." + enumTier.getName() + ".plain");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public class BlockParticlesCollider extends BlockAbstractAccelerator {
|
|||
public BlockParticlesCollider(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.particles_collider");
|
||||
setTranslationKey("warpdrive.atomic.particles_collider");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BlockParticlesInjector extends BlockAcceleratorControlPoint {
|
|||
public BlockParticlesInjector(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, true);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.particles_injector");
|
||||
setTranslationKey("warpdrive.atomic.particles_injector");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false));
|
||||
|
|
|
@ -17,7 +17,7 @@ public class BlockVoidShellGlass extends BlockVoidShellPlain {
|
|||
public BlockVoidShellGlass(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.void_shell_glass");
|
||||
setTranslationKey("warpdrive.atomic.void_shell_glass");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -7,6 +7,6 @@ public class BlockVoidShellPlain extends BlockAbstractAccelerator {
|
|||
public BlockVoidShellPlain(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier);
|
||||
|
||||
setUnlocalizedName("warpdrive.atomic.void_shell_plain");
|
||||
setTranslationKey("warpdrive.atomic.void_shell_plain");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.FIRE);
|
||||
|
||||
setHardness(0.0F);
|
||||
setUnlocalizedName("warpdrive.breathing.air");
|
||||
setTranslationKey("warpdrive.breathing.air");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -99,7 +99,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer {
|
|||
public BlockAirGeneratorTiered(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.breathing.air_generator." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.breathing.air_generator." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
|
@ -46,7 +46,7 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 7))
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7))
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 8) != 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public class BlockAirShield extends BlockAbstractOmnipanel {
|
|||
public BlockAirShield(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.CLOTH);
|
||||
|
||||
setUnlocalizedName("warpdrive.breathing.air_shield");
|
||||
setTranslationKey("warpdrive.breathing.air_shield");
|
||||
}
|
||||
|
||||
/* @TODO rendering
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockAirSource extends BlockAbstractAir {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockShipScanner extends BlockAbstractContainer {
|
|||
public BlockShipScanner(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.building.ship_scanner");
|
||||
setTranslationKey("warpdrive.building.ship_scanner");
|
||||
}
|
||||
|
||||
/* @TODO camouflage
|
||||
|
|
|
@ -301,8 +301,8 @@ public class TileEntityShipScanner extends TileEntityAbstractMachine implements
|
|||
final JumpShip ship = new JumpShip();
|
||||
ship.world = shipCore.getWorld();
|
||||
ship.core = shipCore.getPos();
|
||||
ship.dx = shipCore.facing.getFrontOffsetX();
|
||||
ship.dz = shipCore.facing.getFrontOffsetZ();
|
||||
ship.dx = shipCore.facing.getXOffset();
|
||||
ship.dz = shipCore.facing.getZOffset();
|
||||
ship.minX = shipCore.minX;
|
||||
ship.maxX = shipCore.maxX;
|
||||
ship.minY = shipCore.minY;
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockLaserTreeFarm extends BlockAbstractContainer {
|
|||
public BlockLaserTreeFarm(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.collection.laser_tree_farm");
|
||||
setTranslationKey("warpdrive.collection.laser_tree_farm");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumLaserTreeFarmMode.INACTIVE));
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockMiningLaser extends BlockAbstractContainer {
|
|||
public BlockMiningLaser(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.collection.mining_laser");
|
||||
setTranslationKey("warpdrive.collection.mining_laser");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumMiningLaserMode.INACTIVE));
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
setHardness(WarpDriveConfig.HULL_HARDNESS[0]);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[0] * 5 / 3);
|
||||
setSoundType(SoundType.METAL);
|
||||
setUnlocalizedName(unlocalizedName);
|
||||
setTranslationKey(unlocalizedName);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockProperties.FACING, EnumFacing.NORTH));
|
||||
|
||||
setLightLevel(14.0F / 15.0F);
|
||||
|
@ -51,7 +51,7 @@ public class BlockAbstractLamp extends BlockAbstractBase {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockBedrockGlass extends BlockAbstractBase {
|
|||
setResistance(6000000.0F);
|
||||
setSoundType(SoundType.STONE);
|
||||
disableStats();
|
||||
setUnlocalizedName("warpdrive.decoration.bedrock_glass");
|
||||
setTranslationKey("warpdrive.decoration.bedrock_glass");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -71,7 +71,7 @@ public class BlockBedrockGlass extends BlockAbstractBase {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class BlockBedrockGlass extends BlockAbstractBase {
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class BlockDecorative extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setHardness(1.5f);
|
||||
setUnlocalizedName("warpdrive.decoration.decorative.");
|
||||
setTranslationKey("warpdrive.decoration.decorative.");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(TYPE, EnumDecorativeType.PLAIN));
|
||||
itemStackCache = new ItemStack[EnumDecorativeType.length];
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BlockGas extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.FIRE);
|
||||
|
||||
setHardness(0.0F);
|
||||
setUnlocalizedName("warpdrive.decoration.gas");
|
||||
setTranslationKey("warpdrive.decoration.gas");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(COLOR, EnumGasColor.RED));
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class BlockGas extends BlockAbstractBase {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class BlockGas extends BlockAbstractBase {
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class BlockLamp_bubble extends BlockAbstractLamp {
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
}
|
|
@ -15,10 +15,10 @@ public class ItemBlockDecorative extends ItemBlockAbstractBase {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final ItemStack itemStack) {
|
||||
public String getTranslationKey(final ItemStack itemStack) {
|
||||
if (itemStack == null) {
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
return getUnlocalizedName() + EnumDecorativeType.get(itemStack.getItemDamage()).getName();
|
||||
return getTranslationKey() + EnumDecorativeType.get(itemStack.getItemDamage()).getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ public class BlockCamera extends BlockAbstractContainer {
|
|||
public BlockCamera(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.detection.camera");
|
||||
setTranslationKey("warpdrive.detection.camera");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BlockCloakingCoil extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setHardness(3.5F);
|
||||
setUnlocalizedName("warpdrive.detection.cloaking_coil");
|
||||
setTranslationKey("warpdrive.detection.cloaking_coil");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
@ -58,7 +58,7 @@ public class BlockCloakingCoil extends BlockAbstractBase {
|
|||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, isActive)
|
||||
.withProperty(OUTER, isOuter)
|
||||
.withProperty(BlockProperties.FACING, isOuter ? EnumFacing.getFront((metadata & 7) - 1) : EnumFacing.UP);
|
||||
.withProperty(BlockProperties.FACING, isOuter ? EnumFacing.byIndex((metadata & 7) - 1) : EnumFacing.UP);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -26,7 +26,7 @@ public class BlockCloakingCore extends BlockAbstractContainer {
|
|||
public BlockCloakingCore(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.detection.cloaking_core");
|
||||
setTranslationKey("warpdrive.detection.cloaking_core");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(BlockProperties.ACTIVE, false));
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class BlockMonitor extends BlockAbstractRotatingContainer {
|
|||
public BlockMonitor(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.detection.monitor");
|
||||
setTranslationKey("warpdrive.detection.monitor");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockRadar extends BlockAbstractContainer {
|
|||
public BlockRadar(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.detection.radar");
|
||||
setTranslationKey("warpdrive.detection.radar");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumRadarMode.INACTIVE));
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockSiren extends BlockAbstractContainer {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
this.isIndustrial = isIndustrial;
|
||||
setUnlocalizedName("warpdrive.detection.siren_" + (isIndustrial ? "industrial" : "military") + "." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.detection.siren_" + (isIndustrial ? "industrial" : "military") + "." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
@ -51,7 +51,7 @@ public class BlockSiren extends BlockAbstractContainer {
|
|||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 0x7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,7 @@ public class BlockSiren extends BlockAbstractContainer {
|
|||
super.addInformation(itemStack, world, list, advancedItemTooltips);
|
||||
|
||||
final int range = MathHelper.floor(WarpDriveConfig.SIREN_RANGE_BLOCKS_BY_TIER[enumTier.getIndex()]);
|
||||
final String unlocalizedName_withoutTier = getUnlocalizedName().replace("." + enumTier.getName(), "");
|
||||
final String unlocalizedName_withoutTier = getTranslationKey().replace("." + enumTier.getName(), "");
|
||||
Commons.addTooltip(list, new TextComponentTranslation(unlocalizedName_withoutTier + ".tooltip.usage",
|
||||
range).getFormattedText());
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class BlockWarpIsolation extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setHardness(3.5F);
|
||||
setUnlocalizedName("warpdrive.detection.warp_isolation");
|
||||
setTranslationKey("warpdrive.detection.warp_isolation");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +34,7 @@ public class BlockWarpIsolation extends BlockAbstractBase {
|
|||
@Nonnull final List<String> list, @Nullable final ITooltipFlag advancedItemTooltips) {
|
||||
super.addInformation(itemStack, world, list, advancedItemTooltips);
|
||||
|
||||
Commons.addTooltip(list, new TextComponentTranslation(getUnlocalizedName() + ".tooltip.usage",
|
||||
Commons.addTooltip(list, new TextComponentTranslation(getTranslationKey() + ".tooltip.usage",
|
||||
WarpDriveConfig.RADAR_MIN_ISOLATION_BLOCKS,
|
||||
Math.round(WarpDriveConfig.RADAR_MIN_ISOLATION_EFFECT * 100.0D),
|
||||
WarpDriveConfig.RADAR_MAX_ISOLATION_BLOCKS,
|
||||
|
|
|
@ -243,13 +243,13 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyConsumer {
|
|||
&& distanceOuterCoils_blocks[direction.ordinal()] > 0) {
|
||||
PacketHandler.sendBeamPacketToPlayersInArea(world,
|
||||
new Vector3(
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getFrontOffsetX(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getFrontOffsetY(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getFrontOffsetZ()),
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getXOffset(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getYOffset(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * direction.getZOffset()),
|
||||
new Vector3(
|
||||
pos.getX() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getFrontOffsetX(),
|
||||
pos.getY() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getFrontOffsetY(),
|
||||
pos.getZ() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getFrontOffsetZ()),
|
||||
pos.getX() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getXOffset(),
|
||||
pos.getY() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getYOffset(),
|
||||
pos.getZ() + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.getZOffset()),
|
||||
r, g, b,
|
||||
LASER_DURATION_TICKS,
|
||||
new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ));
|
||||
|
@ -274,13 +274,13 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergyConsumer {
|
|||
|
||||
PacketHandler.sendBeamPacketToPlayersInArea(world,
|
||||
new Vector3(
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getFrontOffsetX() + 0.2D * stop .getFrontOffsetX(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getFrontOffsetY() + 0.2D * stop .getFrontOffsetY(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getFrontOffsetZ() + 0.2D * stop .getFrontOffsetZ()),
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getXOffset() + 0.2D * stop .getXOffset(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getYOffset() + 0.2D * stop .getYOffset(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * start.getZOffset() + 0.2D * stop .getZOffset()),
|
||||
new Vector3(
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getFrontOffsetX() + 0.2D * start.getFrontOffsetX(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getFrontOffsetY() + 0.2D * start.getFrontOffsetY(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getFrontOffsetZ() + 0.2D * start.getFrontOffsetZ()),
|
||||
pos.getX() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getXOffset() + 0.2D * start.getXOffset(),
|
||||
pos.getY() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getYOffset() + 0.2D * start.getYOffset(),
|
||||
pos.getZ() + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .getZOffset() + 0.2D * start.getZOffset()),
|
||||
r, g, b,
|
||||
LASER_DURATION_TICKS,
|
||||
new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ));
|
||||
|
|
|
@ -165,6 +165,6 @@ public class TileEntitySiren extends TileEntityAbstractMachine {
|
|||
|
||||
// Checks if the siren is being powered by redstone.
|
||||
private boolean isPowered() {
|
||||
return world.isBlockIndirectlyGettingPowered(pos) > 0;
|
||||
return world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BlockCapacitor extends BlockAbstractContainer implements IExplosion
|
|||
public BlockCapacitor(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.energy.capacitor." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.energy.capacitor." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(CONFIG, EnumDisabledInputOutput.DISABLED)
|
||||
|
|
|
@ -17,7 +17,7 @@ public class BlockEnanReactorController extends BlockAbstractContainer {
|
|||
public BlockEnanReactorController(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.energy.enan_reactor_controller." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_controller." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockEnanReactorCore extends BlockAbstractContainer {
|
|||
public BlockEnanReactorCore(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.energy.enan_reactor_core." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_core." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(ENERGY, 0)
|
||||
|
|
|
@ -24,7 +24,7 @@ public class BlockEnanReactorFrameGlass extends BlockAbstractBase {
|
|||
|
||||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()] / 3);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] / 3 * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -42,7 +42,7 @@ public class BlockEnanReactorFrameGlass extends BlockAbstractBase {
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockEnanReactorFramePlain extends BlockAbstractBase {
|
|||
|
||||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()] / 3);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] / 3 * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockProperties.FRAME, EnumFrameType.PLAIN));
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockEnanReactorLaser extends BlockAbstractContainer {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setResistance(60.0F * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.energy.enan_reactor_laser");
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_laser");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
@ -42,7 +42,7 @@ public class BlockEnanReactorLaser extends BlockAbstractContainer {
|
|||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 0x7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockIC2reactorLaserCooler extends BlockAbstractContainer {
|
|||
public BlockIC2reactorLaserCooler(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.energy.ic2_reactor_laser_cooler");
|
||||
setTranslationKey("warpdrive.energy.ic2_reactor_laser_cooler");
|
||||
|
||||
setDefaultState(blockState.getBaseState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.DOWN)
|
||||
|
@ -42,7 +42,7 @@ public class BlockIC2reactorLaserCooler extends BlockAbstractContainer {
|
|||
final int facing = (metadata & 7) < 6 ? (metadata & 7) : 0;
|
||||
final EnumValidPowered enumValidPowered = EnumValidPowered.get(metadata - facing);
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(facing))
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(facing))
|
||||
.withProperty(BlockProperties.VALID_POWERED, enumValidPowered != null ? enumValidPowered : EnumValidPowered.INVALID);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,9 +161,9 @@ public class TileEntityEnanReactorCore extends TileEntityEnanReactorController {
|
|||
if (lasersReceived > 1.0F) {
|
||||
nospamFactor = 0.5;
|
||||
world.newExplosion(null,
|
||||
pos.getX() + reactorFace.x - reactorFace.facingLaserProperty.getFrontOffsetX(),
|
||||
pos.getY() + reactorFace.y - reactorFace.facingLaserProperty.getFrontOffsetY(),
|
||||
pos.getZ() + reactorFace.z - reactorFace.facingLaserProperty.getFrontOffsetZ(),
|
||||
pos.getX() + reactorFace.x - reactorFace.facingLaserProperty.getXOffset(),
|
||||
pos.getY() + reactorFace.y - reactorFace.facingLaserProperty.getYOffset(),
|
||||
pos.getZ() + reactorFace.z - reactorFace.facingLaserProperty.getZOffset(),
|
||||
1, false, false);
|
||||
}
|
||||
final double normalisedAmount = Math.min(1.0D, Math.max(0.0D, amount / PR_MAX_LASER_ENERGY)); // 0.0 to 1.0
|
||||
|
|
|
@ -65,9 +65,9 @@ public class TileEntityIC2reactorLaserMonitor extends TileEntityAbstractLaser {
|
|||
// ignore if we're right next to the reactor
|
||||
// ignore if we're not aligned with the reactor
|
||||
final BlockPos blockPos = reactor.getCoreTe().getPos();
|
||||
if ( blockPos.getX() != pos.getX() + 3 * facing.getFrontOffsetX()
|
||||
|| blockPos.getY() != pos.getY() + 3 * facing.getFrontOffsetY()
|
||||
|| blockPos.getZ() != pos.getZ() + 3 * facing.getFrontOffsetZ() ) {
|
||||
if ( blockPos.getX() != pos.getX() + 3 * facing.getXOffset()
|
||||
|| blockPos.getY() != pos.getY() + 3 * facing.getYOffset()
|
||||
|| blockPos.getZ() != pos.getZ() + 3 * facing.getZOffset() ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class BlockAbstractForceField extends BlockAbstractContainer {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
super(registryName, enumTier, Material.GLASS);
|
||||
|
||||
setSoundType(SoundType.CLOTH);
|
||||
setUnlocalizedName("warpdrive.force_field.block." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.force_field.block." + enumTier.getName());
|
||||
setBlockUnbreakable();
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
|
@ -282,7 +282,9 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(final World world, final BlockPos blockPos, final IBlockState blockState, final Entity entity) {
|
||||
public void onEntityCollision(final World world, final BlockPos blockPos, final IBlockState blockState, final Entity entity) {
|
||||
super.onEntityCollision(world, blockPos, blockState, entity);
|
||||
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
@ -377,7 +379,7 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
final TileEntity tileEntity = world.getTileEntity(new BlockPos((int)explosionX, (int)explosionY, (int)explosionZ));
|
||||
if (enableFirstHit && WarpDriveConfig.LOGGING_FORCE_FIELD) {
|
||||
WarpDrive.logger.info(String.format("Block at location is %s %s with tileEntity %s",
|
||||
blockState.getBlock(), blockState.getBlock().getUnlocalizedName(), tileEntity));
|
||||
blockState.getBlock(), blockState.getBlock().getTranslationKey(), tileEntity));
|
||||
}
|
||||
// explosion with no entity and block removed, hence we can't compute the energy impact => boosting explosion resistance
|
||||
return 2.0F * super.getExplosionResistance(entity, world, blockPos, explosionX, explosionY, explosionZ);
|
||||
|
@ -481,10 +483,10 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByExplosion(final World world, final BlockPos blockPos, final Explosion explosion) {
|
||||
public void onExplosionDestroy(final World world, final BlockPos blockPos, final Explosion explosion) {
|
||||
// (block is already set to air by caller, see IC2 iTNT for example)
|
||||
downgrade(world, blockPos);
|
||||
super.onBlockDestroyedByExplosion(world, blockPos, explosion);
|
||||
super.onExplosionDestroy(world, blockPos, explosion);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,7 +59,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
public BlockForceFieldProjector(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.force_field.projector." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.force_field.projector." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.NORTH)
|
||||
|
@ -80,7 +80,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 7))
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 7))
|
||||
.withProperty(IS_DOUBLE_SIDED, metadata > 7);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BlockForceFieldRelay extends BlockAbstractForceField {
|
|||
public BlockForceFieldRelay(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.force_field.relay." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.force_field.relay." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(UPGRADE, EnumForceFieldUpgrade.NONE));
|
||||
}
|
||||
|
|
|
@ -30,10 +30,10 @@ public class ItemBlockForceFieldProjector extends ItemBlockAbstractBase {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final ItemStack itemStack) {
|
||||
public String getTranslationKey(final ItemStack itemStack) {
|
||||
if (itemStack == null) {
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
return getUnlocalizedName() + (itemStack.getItemDamage() == 1 ? ".double" : ".single");
|
||||
return getTranslationKey() + (itemStack.getItemDamage() == 1 ? ".double" : ".single");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
|
||||
// skip non loaded chunks
|
||||
if ( !world.isBlockLoaded(vector.getBlockPos(), false)
|
||||
|| !world.getChunkFromBlockCoords(vector.getBlockPos()).isLoaded() ) {
|
||||
|| !world.getChunk(vector.getBlockPos()).isLoaded() ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
fluid = block instanceof IFluidBlock ? ((IFluidBlock) block).getFluid() : Commons.fluid_getByBlock(block);
|
||||
if (WarpDriveConfig.LOGGING_FORCE_FIELD) {
|
||||
WarpDrive.logger.info(String.format("Block %s %s Fluid %s with viscosity %d, projector max is %.1f: %s %s",
|
||||
block.getUnlocalizedName(),
|
||||
block.getTranslationKey(),
|
||||
blockState,
|
||||
fluid == null ? null : fluid.getName(),
|
||||
fluid == null ? 0 : fluid.getViscosity(),
|
||||
|
@ -463,7 +463,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
if (fluid == null) {
|
||||
if ((world.getWorldTime() & 0xFF) == 0) {
|
||||
WarpDrive.logger.error(String.format("Block %s %s is not a valid fluid! %s",
|
||||
block.getUnlocalizedName(),
|
||||
block.getTranslationKey(),
|
||||
blockState,
|
||||
block));
|
||||
}
|
||||
|
@ -609,6 +609,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
final FluidStack fluidStack;
|
||||
if (isForceFluid) {
|
||||
fluidStack = ((IFluidBlock) block).drain(world, vector.getBlockPos(), true);
|
||||
assert fluidStack != null;
|
||||
} else {
|
||||
fluidStack = new FluidStack(fluid, 1000);
|
||||
}
|
||||
|
@ -891,7 +892,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
public float getRotationYaw() {
|
||||
final int metadata = getBlockMetadata();
|
||||
float totalYaw;
|
||||
switch (EnumFacing.getFront(metadata & 7)) {
|
||||
switch (EnumFacing.byIndex(metadata & 7)) {
|
||||
case DOWN : totalYaw = 0.0F; break;
|
||||
case UP : totalYaw = 0.0F; break;
|
||||
case NORTH: totalYaw = 90.0F; break;
|
||||
|
@ -909,7 +910,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
|
|||
public float getRotationPitch() {
|
||||
final int metadata = getBlockMetadata();
|
||||
float totalPitch;
|
||||
switch (EnumFacing.getFront(metadata & 7)) {
|
||||
switch (EnumFacing.byIndex(metadata & 7)) {
|
||||
case DOWN : totalPitch = 180.0F; break;
|
||||
case UP : totalPitch = 0.0F; break;
|
||||
case NORTH: totalPitch = -90.0F; break;
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockHullGlass extends BlockColored implements IBlockBase, IDamageR
|
|||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] * 5 / 3);
|
||||
setSoundType(SoundType.GLASS);
|
||||
setCreativeTab(WarpDrive.creativeTabHull);
|
||||
setUnlocalizedName("warpdrive.hull." + enumTier.getName() + ".glass.");
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".glass.");
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this, new ItemBlockHull(this));
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class BlockHullGlass extends BlockColored implements IBlockBase, IDamageR
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class BlockHullGlass extends BlockColored implements IBlockBase, IDamageR
|
|||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag
|
|||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] * 5 / 3);
|
||||
setLightLevel(10.0F / 15.0F);
|
||||
setSoundType(SoundType.GLASS);
|
||||
setUnlocalizedName("warpdrive.hull." + enumTier.getName() + ".omnipanel.");
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".omnipanel.");
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockColored.COLOR, EnumDyeColor.WHITE));
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this, new ItemBlockHull(this));
|
||||
|
@ -46,7 +46,7 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver
|
|||
this.enumHullPlainType = enumHullPlainType;
|
||||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()]);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.hull." + enumTier.getName() + ".plain.");
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".plain.");
|
||||
setDefaultState(blockState.getBaseState().withProperty(BlockColored.COLOR, EnumDyeColor.WHITE));
|
||||
setCreativeTab(WarpDrive.creativeTabHull);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] * 5 / 3);
|
||||
setSoundType(SoundType.METAL);
|
||||
setCreativeTab(WarpDrive.creativeTabHull);
|
||||
setUnlocalizedName("warpdrive.hull." + enumTier.getName() + ".slab." + EnumDyeColor.byMetadata(blockStateHull.getBlock().getMetaFromState(blockStateHull)).getUnlocalizedName());
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".slab." + EnumDyeColor.byMetadata(blockStateHull.getBlock().getMetaFromState(blockStateHull)).getTranslationKey());
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this, new ItemBlockHullSlab(this));
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,8 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei
|
|||
// ItemSlab abstract methods
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final int metadata) {
|
||||
return getUnlocalizedName();
|
||||
public String getTranslationKey(final int metadata) {
|
||||
return getTranslationKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlockHullStairs extends BlockStairs implements IBlockBase, IDamageR
|
|||
this.blockStateHull = blockStateHull;
|
||||
this.enumTier = enumTier;
|
||||
setCreativeTab(WarpDrive.creativeTabHull);
|
||||
setUnlocalizedName("warpdrive.hull." + enumTier.getName() + ".stairs." + EnumDyeColor.byMetadata(blockStateHull.getBlock().getMetaFromState(blockStateHull)).getUnlocalizedName());
|
||||
setTranslationKey("warpdrive.hull." + enumTier.getName() + ".stairs." + EnumDyeColor.byMetadata(blockStateHull.getBlock().getMetaFromState(blockStateHull)).getTranslationKey());
|
||||
setRegistryName(registryName);
|
||||
WarpDrive.register(this, new ItemBlockHull(this));
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class BlockHullStairs extends BlockStairs implements IBlockBase, IDamageR
|
|||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag(final IBlockState state) {
|
||||
public EnumPushReaction getPushReaction(final IBlockState state) {
|
||||
return EnumPushReaction.BLOCK;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,10 @@ public class ItemBlockHull extends ItemBlockAbstractBase {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final ItemStack itemStack) {
|
||||
public String getTranslationKey(final ItemStack itemStack) {
|
||||
if (itemStack == null || block instanceof BlockHullStairs) {
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
return getUnlocalizedName() + EnumDyeColor.byMetadata( itemStack.getItemDamage() ).getUnlocalizedName();
|
||||
return getTranslationKey() + EnumDyeColor.byMetadata( itemStack.getItemDamage() ).getTranslationKey();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ public class ItemBlockHullSlab extends ItemBlockHull {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(final ItemStack itemstack) {
|
||||
return getUnlocalizedName();
|
||||
public String getTranslationKey(final ItemStack itemstack) {
|
||||
return getTranslationKey();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -14,7 +14,7 @@ public class BlockJumpGateCore extends BlockAbstractContainer {
|
|||
public BlockJumpGateCore(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.jump_gate_core." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.movement.jump_gate_core." + enumTier.getName());
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockLift extends BlockAbstractContainer {
|
|||
public BlockLift(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.lift");
|
||||
setTranslationKey("warpdrive.movement.lift");
|
||||
|
||||
setDefaultState(getDefaultState().withProperty(MODE, EnumLiftMode.INACTIVE));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockShipController extends BlockAbstractContainer {
|
|||
public BlockShipController(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.ship_controller." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.movement.ship_controller." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(COMMAND, EnumShipCommand.OFFLINE)
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BlockShipCore extends BlockAbstractContainer {
|
|||
public BlockShipCore(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.ship_core." + enumTier.getName());
|
||||
setTranslationKey("warpdrive.movement.ship_core." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
@ -53,7 +53,7 @@ public class BlockShipCore extends BlockAbstractContainer {
|
|||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, (metadata & 0x8) != 0)
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.getFront(metadata & 0x7));
|
||||
.withProperty(BlockProperties.FACING, EnumFacing.byIndex(metadata & 0x7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public class BlockTransporterBeacon extends BlockAbstractContainer {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setHardness(0.5F);
|
||||
setUnlocalizedName("warpdrive.movement.transporter_beacon");
|
||||
setTranslationKey("warpdrive.movement.transporter_beacon");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.ACTIVE, false)
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockTransporterContainment extends BlockAbstractBase {
|
|||
public BlockTransporterContainment(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.transporter_containment");
|
||||
setTranslationKey("warpdrive.movement.transporter_containment");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BlockTransporterCore extends BlockAbstractContainer {
|
|||
public BlockTransporterCore(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.transporter_core");
|
||||
setTranslationKey("warpdrive.movement.transporter_core");
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(VARIANT, EnumTransporterState.DISABLED)
|
||||
|
|
|
@ -28,7 +28,7 @@ public class BlockTransporterScanner extends BlockAbstractBase {
|
|||
public BlockTransporterScanner(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setUnlocalizedName("warpdrive.movement.transporter_scanner");
|
||||
setTranslationKey("warpdrive.movement.transporter_scanner");
|
||||
setLightOpacity(255);
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
|
|
|
@ -69,7 +69,7 @@ public class TileEntityLift extends TileEntityAbstractEnergyConsumer implements
|
|||
|
||||
// Switching mode
|
||||
if ( computerMode == EnumLiftMode.DOWN
|
||||
|| (computerMode == EnumLiftMode.REDSTONE && world.isBlockIndirectlyGettingPowered(pos) > 0)) {
|
||||
|| (computerMode == EnumLiftMode.REDSTONE && world.getRedstonePowerFromNeighbors(pos) > 0)) {
|
||||
mode = EnumLiftMode.DOWN;
|
||||
} else {
|
||||
mode = EnumLiftMode.UP;
|
||||
|
|
|
@ -667,9 +667,9 @@ public class TileEntityShipCore extends TileEntityAbstractShipController impleme
|
|||
final BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(pos);
|
||||
for (final VectorI vOffset : SUMMON_OFFSETS) {
|
||||
mutableBlockPos.setPos(
|
||||
pos.getX() + facing.getFrontOffsetX() * vOffset.x + facing.getFrontOffsetZ() * vOffset.z,
|
||||
pos.getX() + facing.getXOffset() * vOffset.x + facing.getZOffset() * vOffset.z,
|
||||
pos.getY(),
|
||||
pos.getZ() + facing.getFrontOffsetZ() * vOffset.x + facing.getFrontOffsetX() * vOffset.z);
|
||||
pos.getZ() + facing.getZOffset() * vOffset.x + facing.getXOffset() * vOffset.z);
|
||||
if (world.isAirBlock(mutableBlockPos)) {
|
||||
if (world.isAirBlock(mutableBlockPos.add(0, 1, 0))) {
|
||||
summonPlayer(entityPlayer, mutableBlockPos);
|
||||
|
@ -709,22 +709,22 @@ public class TileEntityShipCore extends TileEntityAbstractShipController impleme
|
|||
shipVolume = 0;
|
||||
|
||||
// compute dimensions in game coordinates
|
||||
if (facing.getFrontOffsetX() == 1) {
|
||||
if (facing.getXOffset() == 1) {
|
||||
minX = pos.getX() - getBack();
|
||||
maxX = pos.getX() + getFront();
|
||||
minZ = pos.getZ() - getLeft();
|
||||
maxZ = pos.getZ() + getRight();
|
||||
} else if (facing.getFrontOffsetX() == -1) {
|
||||
} else if (facing.getXOffset() == -1) {
|
||||
minX = pos.getX() - getFront();
|
||||
maxX = pos.getX() + getBack();
|
||||
minZ = pos.getZ() - getRight();
|
||||
maxZ = pos.getZ() + getLeft();
|
||||
} else if (facing.getFrontOffsetZ() == 1) {
|
||||
} else if (facing.getZOffset() == 1) {
|
||||
minZ = pos.getZ() - getBack();
|
||||
maxZ = pos.getZ() + getFront();
|
||||
minX = pos.getX() - getRight();
|
||||
maxX = pos.getX() + getLeft();
|
||||
} else if (facing.getFrontOffsetZ() == -1) {
|
||||
} else if (facing.getZOffset() == -1) {
|
||||
minZ = pos.getZ() - getFront();
|
||||
maxZ = pos.getZ() + getBack();
|
||||
minX = pos.getX() - getLeft();
|
||||
|
@ -1048,9 +1048,9 @@ public class TileEntityShipCore extends TileEntityAbstractShipController impleme
|
|||
if (Math.abs(movement.z) - shipSize.z > maxDistance) {
|
||||
movement.z = (int) Math.signum(movement.z) * (shipSize.z + maxDistance);
|
||||
}
|
||||
moveX = facing.getFrontOffsetX() * movement.x - facing.getFrontOffsetZ() * movement.z;
|
||||
moveX = facing.getXOffset() * movement.x - facing.getZOffset() * movement.z;
|
||||
moveY = movement.y;
|
||||
moveZ = facing.getFrontOffsetZ() * movement.x + facing.getFrontOffsetX() * movement.z;
|
||||
moveZ = facing.getZOffset() * movement.x + facing.getXOffset() * movement.z;
|
||||
}
|
||||
|
||||
if (WarpDriveConfig.LOGGING_JUMP) {
|
||||
|
@ -1219,7 +1219,7 @@ public class TileEntityShipCore extends TileEntityAbstractShipController impleme
|
|||
|
||||
@Override
|
||||
public Object[] getOrientation() {
|
||||
return new Object[] { facing.getFrontOffsetX(), 0, facing.getFrontOffsetZ() };
|
||||
return new Object[] { facing.getXOffset(), 0, facing.getZOffset() };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,6 +11,6 @@ public class BlockHighlyAdvancedMachine extends BlockAbstractBase {
|
|||
super(registryName, enumTier, Material.IRON);
|
||||
|
||||
setHardness(5.0F);
|
||||
setUnlocalizedName("warpdrive.passive.highly_advanced_machine");
|
||||
setTranslationKey("warpdrive.passive.highly_advanced_machine");
|
||||
}
|
||||
}
|
|
@ -12,6 +12,6 @@ public class BlockIridium extends BlockAbstractBase {
|
|||
|
||||
setHardness(3.4F);
|
||||
setResistance(360.0F * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.passive.iridium_block");
|
||||
setTranslationKey("warpdrive.passive.iridium_block");
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@ public class BlockLaserCamera extends BlockAbstractContainer {
|
|||
|
||||
setHardness(50.0F);
|
||||
setResistance(20.0F * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.weapon.laser_camera");
|
||||
setTranslationKey("warpdrive.weapon.laser_camera");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -16,7 +16,7 @@ public class BlockWeaponController extends BlockAbstractContainer {
|
|||
|
||||
setHardness(50.0F);
|
||||
setResistance(20.0F * 5 / 3);
|
||||
setUnlocalizedName("warpdrive.weapon.weapon_controller");
|
||||
setTranslationKey("warpdrive.weapon.weapon_controller");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -105,7 +105,7 @@ public class ClientProxy extends CommonProxy {
|
|||
|
||||
// use damage value as suffix for pure items
|
||||
if (item.getHasSubtypes()) {
|
||||
resourceLocation = new ResourceLocation(resourceLocation.getResourceDomain(), resourceLocation.getResourcePath() + "-" + itemStack.getItemDamage());
|
||||
resourceLocation = new ResourceLocation(resourceLocation.getNamespace(), resourceLocation.getPath() + "-" + itemStack.getItemDamage());
|
||||
}
|
||||
return new ModelResourceLocation(resourceLocation, "inventory");
|
||||
}
|
||||
|
|
|
@ -21,11 +21,11 @@ public abstract class CreativeTabAbstractBase extends CreativeTabs {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
public ItemStack getIcon() {
|
||||
final long timeCurrent = System.currentTimeMillis();
|
||||
if (timeLastChange < timeCurrent) {
|
||||
timeLastChange = timeCurrent + period;
|
||||
itemStack = getTabIconItem();
|
||||
itemStack = createIcon();
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class CreativeTabHull extends CreativeTabAbstractBase {
|
|||
@Nonnull
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack getTabIconItem() {
|
||||
public ItemStack createIcon() {
|
||||
final int tier = random.nextInt(3);
|
||||
final int metadata = random.nextInt(16);
|
||||
switch (random.nextInt(6)) {
|
||||
|
|
|
@ -18,7 +18,7 @@ public class CreativeTabMain extends CreativeTabAbstractBase {
|
|||
@Nonnull
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack getTabIconItem() {
|
||||
public ItemStack createIcon() {
|
||||
return ItemShipToken.getItemStack(random);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,11 +55,11 @@ public class CommandDump extends AbstractCommand {
|
|||
// validate
|
||||
IInventory inventory = null;
|
||||
for (final EnumFacing direction : EnumFacing.values()) {
|
||||
inventory = getInventory(world, x + direction.getFrontOffsetX(), y + direction.getFrontOffsetY(), z + direction.getFrontOffsetZ());
|
||||
inventory = getInventory(world, x + direction.getXOffset(), y + direction.getYOffset(), z + direction.getZOffset());
|
||||
if (inventory != null) {
|
||||
x += direction.getFrontOffsetX();
|
||||
y += direction.getFrontOffsetY();
|
||||
z += direction.getFrontOffsetZ();
|
||||
x += direction.getXOffset();
|
||||
y += direction.getYOffset();
|
||||
z += direction.getZOffset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class CommandDump extends AbstractCommand {
|
|||
final String stringNBT = !itemStack.hasTagCompound() ? "" : String.format(" nbt=\"%s\"", itemStack.getTagCompound());
|
||||
WarpDrive.logger.info(String.format("Slot %3d is <loot item=\"%s:%s\"%s minQuantity=\"%d\" minQuantity=\"%d\"%s weight=\"1\" /><!-- %s -->",
|
||||
indexSlot,
|
||||
uniqueIdentifier.getResourceDomain(), uniqueIdentifier.getResourcePath(),
|
||||
uniqueIdentifier.getNamespace(), uniqueIdentifier.getPath(),
|
||||
stringDamage,
|
||||
itemStack.getCount(), itemStack.getCount(),
|
||||
stringNBT,
|
||||
|
|
|
@ -49,17 +49,17 @@ public class CompatBuildCraft implements IBlockTransformer {
|
|||
public boolean isJumpReady(final Block block, final int metadata, final TileEntity tileEntity, final WarpDriveText reason) {
|
||||
if (classTileEntityQuarry.isInstance(tileEntity)) {
|
||||
reason.append(Commons.styleWarning, "warpdrive.compat.guide.block_detected_on_board",
|
||||
new TextComponentTranslation(block.getUnlocalizedName()));
|
||||
new TextComponentTranslation(block.getTranslationKey()));
|
||||
return false;
|
||||
}
|
||||
if (classTileEntityFiller.isInstance(tileEntity)) {
|
||||
reason.append(Commons.styleWarning, "warpdrive.compat.guide.block_detected_on_board",
|
||||
new TextComponentTranslation(block.getUnlocalizedName()));
|
||||
new TextComponentTranslation(block.getTranslationKey()));
|
||||
return false;
|
||||
}
|
||||
if (classTileEntityZonePlanner.isInstance(tileEntity)) {
|
||||
reason.append(Commons.styleWarning, "warpdrive.compat.guide.block_detected_on_board",
|
||||
new TextComponentTranslation(block.getUnlocalizedName()));
|
||||
new TextComponentTranslation(block.getTranslationKey()));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -137,7 +137,7 @@ public class Filler implements IXmlRepresentableUnit {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Filler(" + block.getUnlocalizedName() + "@" + metadata + ")";
|
||||
return "Filler(" + block.getTranslationKey() + "@" + metadata + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -119,7 +119,7 @@ public class RecipeTuningDriver implements IRecipe {
|
|||
// find a matching dye from ore dictionary
|
||||
boolean matched = false;
|
||||
for (final EnumDyeColor enumDyeColor : EnumDyeColor.values()) {
|
||||
final List<ItemStack> itemStackDyes = OreDictionary.getOres("dye" + enumDyeColor.getUnlocalizedName());
|
||||
final List<ItemStack> itemStackDyes = OreDictionary.getOres("dye" + enumDyeColor.getTranslationKey());
|
||||
for (final ItemStack itemStackDye : itemStackDyes) {
|
||||
if (OreDictionary.itemMatches(itemStackSlot, itemStackDye, true)) {
|
||||
// match found, update dye combination
|
||||
|
|
|
@ -360,9 +360,9 @@ public class AcceleratorSetup extends GlobalPosition {
|
|||
final EnumFacing directionRight = forgeDirection.rotateYCCW();
|
||||
for (int indexCorner = 0; indexCorner < 4; indexCorner++) {
|
||||
final VectorI vector = new VectorI(
|
||||
vCenter.x + ((indexCorner & 1) != 0 ? directionLeft.getFrontOffsetX() : directionRight.getFrontOffsetX()),
|
||||
vCenter.x + ((indexCorner & 1) != 0 ? directionLeft.getXOffset() : directionRight.getXOffset()),
|
||||
vCenter.y + ((indexCorner & 2) != 0 ? 1 : -1),
|
||||
vCenter.z + ((indexCorner & 1) != 0 ? directionLeft.getFrontOffsetZ() : directionRight.getFrontOffsetZ()));
|
||||
vCenter.z + ((indexCorner & 1) != 0 ? directionLeft.getZOffset() : directionRight.getZOffset()));
|
||||
final Block block = vector.getBlock(world);
|
||||
if (block instanceof BlockChiller) {
|
||||
final EnumTier enumTier = ((BlockChiller) block).getTier(ItemStack.EMPTY);
|
||||
|
|
|
@ -62,9 +62,9 @@ public class AirSpreader {
|
|||
for (final EnumFacing forgeDirection : directions) {
|
||||
final StateAir stateAir = stateAround[forgeDirection.ordinal()];
|
||||
stateAir.refresh(world,
|
||||
x + forgeDirection.getFrontOffsetX(),
|
||||
y + forgeDirection.getFrontOffsetY(),
|
||||
z + forgeDirection.getFrontOffsetZ());
|
||||
x + forgeDirection.getXOffset(),
|
||||
y + forgeDirection.getYOffset(),
|
||||
z + forgeDirection.getZOffset());
|
||||
if (stateAir.isAir(forgeDirection)) {
|
||||
air_count++;
|
||||
if (stateAir.concentration > 0) {// (note1)
|
||||
|
@ -106,9 +106,9 @@ public class AirSpreader {
|
|||
for (final EnumFacing direction : directions) {
|
||||
final StateAir stateAir = stateAround[direction.ordinal()];
|
||||
stateAir.refresh(world,
|
||||
x + direction.getFrontOffsetX(),
|
||||
y + direction.getFrontOffsetY(),
|
||||
z + direction.getFrontOffsetZ());
|
||||
x + direction.getXOffset(),
|
||||
y + direction.getYOffset(),
|
||||
z + direction.getZOffset());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,9 +125,9 @@ public class AirSpreader {
|
|||
for (final EnumFacing direction : directions) {
|
||||
final StateAir stateAir = stateAround[direction.ordinal()];
|
||||
stateAir.refresh(world,
|
||||
x + direction.getFrontOffsetX(),
|
||||
y + direction.getFrontOffsetY(),
|
||||
z + direction.getFrontOffsetZ());
|
||||
x + direction.getXOffset(),
|
||||
y + direction.getYOffset(),
|
||||
z + direction.getZOffset());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,9 +241,9 @@ public class AirSpreader {
|
|||
if (stateCenter.isAirSource()) {
|
||||
final EnumFacing facingSource = blockStateSource.getValue(BlockProperties.FACING);
|
||||
final IBlockState blockStateGenerator = world.getBlockState(mutableBlockPos.setPos(
|
||||
x - facingSource.getFrontOffsetX(),
|
||||
y - facingSource.getFrontOffsetY(),
|
||||
z - facingSource.getFrontOffsetZ()));
|
||||
x - facingSource.getXOffset(),
|
||||
y - facingSource.getYOffset(),
|
||||
z - facingSource.getZOffset()));
|
||||
if (blockStateGenerator.getBlock() instanceof BlockAirGeneratorTiered) {
|
||||
final EnumFacing facingGenerator = blockStateGenerator.getValue(BlockProperties.FACING);
|
||||
if (facingGenerator == facingSource) {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class CamerasRegistry {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!world.getChunkFromBlockCoords(cam.position).isLoaded()) {
|
||||
if (!world.getChunk(cam.position).isLoaded()) {
|
||||
if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) {
|
||||
WarpDrive.logger.info(String.format("Reporting an 'unloaded' camera %s",
|
||||
Commons.format(world, cam.position)));
|
||||
|
|
|
@ -472,7 +472,7 @@ public class ChunkData {
|
|||
AirSpreader.clearCache();
|
||||
if (isModified) {
|
||||
isModified = false;
|
||||
world.getChunkFromChunkCoords(chunkCoordIntPair.x, chunkCoordIntPair.z).markDirty();
|
||||
world.getChunk(chunkCoordIntPair.x, chunkCoordIntPair.z).markDirty();
|
||||
}
|
||||
if ( WarpDriveConfig.LOGGING_CHUNK_HANDLER
|
||||
&& ChunkHandler.delayLogging == 0
|
||||
|
|
|
@ -193,7 +193,7 @@ public class CloakedArea {
|
|||
|
||||
for (int x = minX >> 4; x <= maxX >> 4; x++) {
|
||||
for (int z = minZ >> 4; z <= maxZ >> 4; z++) {
|
||||
chunksToSend.add(p.world.getChunkFromChunkCoords(x, z));
|
||||
chunksToSend.add(p.world.getChunk(x, z));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public enum EnumGasColor implements IStringSerializable {
|
|||
return ID_MAP.get(damage);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public enum EnumLaserTreeFarmMode implements IStringSerializable {
|
|||
return ID_MAP.get(damage);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public enum EnumMiningLaserMode implements IStringSerializable {
|
|||
return ID_MAP.get(damage);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public enum EnumRadarMode implements IStringSerializable {
|
|||
return ID_MAP.get(damage);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue