Code cleanup

This commit is contained in:
Unknown 2019-08-17 15:21:28 +02:00 committed by unknown
parent 371e049b8d
commit 878a885246
11 changed files with 21 additions and 16 deletions

View file

@ -904,6 +904,7 @@ public class WarpDrive {
return block;
}
assert !blocks.contains(block);
blocks.add(block);
if (itemBlock != null) {

View file

@ -559,7 +559,9 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
harvestBlock(blockPosValuable, blockStateValuable);
tickCurrentTask = isLog ? WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS : enableSilktouch ? WarpDriveConfig.TREE_FARM_SILKTOUCH_LEAF_DELAY_TICKS : WarpDriveConfig.TREE_FARM_BREAK_LEAF_DELAY_TICKS;
tickCurrentTask = isLog ? WarpDriveConfig.TREE_FARM_HARVEST_LOG_DELAY_TICKS
: enableSilktouch ? WarpDriveConfig.TREE_FARM_SILKTOUCH_LEAF_DELAY_TICKS
: WarpDriveConfig.TREE_FARM_BREAK_LEAF_DELAY_TICKS;
return EnumTaskResult.CONTINUE;
}

View file

@ -337,7 +337,8 @@ public class TileEntityTransporterCore extends TileEntityAbstractEnergyCoreOrCon
globalPositionRemote.dimensionId,
this ));
isJammed = true;
reasonJammed = String.format("Unable to initialize dimension %d", globalPositionRemote.dimensionId);
reasonJammed = String.format("Unable to initialize dimension %d",
globalPositionRemote.dimensionId);
return;
}

View file

@ -136,6 +136,7 @@ public class JumpBlock {
return worldSource.getTileEntity(new BlockPos(x, y, z));
}
@Nullable
private NBTTagCompound getBlockNBT(@Nonnull final World worldSource) {
if (weakTileEntity == null) {
return blockNBT == null ? null : blockNBT.copy();
@ -502,7 +503,7 @@ public class JumpBlock {
}
}
public void writeToNBT(final World worldSource, final NBTTagCompound tagCompound) {
public void writeToNBT(final World worldSource, @Nonnull final NBTTagCompound tagCompound) {
tagCompound.setString("block", Block.REGISTRY.getNameForObject(block).toString());
tagCompound.setByte("blockMeta", (byte) blockMeta);
final NBTTagCompound nbtTileEntity = getBlockNBT(worldSource);
@ -540,7 +541,7 @@ public class JumpBlock {
tagCompound.removeTag("label");
}
// WarpDrive UUID
// WarpDrive machine signature UUID
if (tagCompound.hasKey(ICoreSignature.UUID_MOST_TAG)) {
tagCompound.removeTag(ICoreSignature.UUID_MOST_TAG);
tagCompound.removeTag(ICoreSignature.UUID_LEAST_TAG);

View file

@ -930,7 +930,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -930,7 +930,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -930,7 +930,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -929,7 +929,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -930,7 +930,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -935,7 +935,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).

View file

@ -929,7 +929,7 @@ warpdrive.ship.guide.max_chunkloading=Close the game, update config/forgeChunkLo
warpdrive.ship.guide.chunkloading_rejected_in_target_world=Chunkloading rejected in target world %s. Aborting.
warpdrive.ship.guide.no_celestial_object_in_hyperspace=No star system exists in %1$s (%2$d), there's nowhere to exit hyperspace!
warpdrive.ship.guide.no_star_system_in_range=Ship won't survive in deep space.\nClosest star system is ~%1$d m away (%2$d %3$d %4$d) to (%5$d %6$d %7$d).
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or configuration.
warpdrive.ship.guide.exception_loading_dimension=Unable to load dimension %1$d.\nCheck console for a missing mod or misconfiguration.
warpdrive.ship.guide.unable_to_reach_hyperspace_from_planet=Unable to engage Alcubierre drive on a planet.\nGet into orbit, then try again.
warpdrive.ship.guide.unable_to_reach_hyperspace_no_parent=Current location has no hyperspace connection.\nThere's no parent defined for %1$s (%2$d).
warpdrive.ship.guide.unable_to_reach_space_no_parent=Current location as no space connection.\nThere's no parent defined for %1$s (%2$d).