Fixed various code review findings
This commit is contained in:
parent
1c74aa8da5
commit
e04344e630
10 changed files with 40 additions and 77 deletions
|
@ -114,7 +114,6 @@ public class Commons {
|
|||
|
||||
final String[] lines = updateEscapeCodes(message).split("\n");
|
||||
String format = "";
|
||||
getFormatFromString(lines[0]);
|
||||
for (final String line : lines) {
|
||||
final String formattedLine = format + line;
|
||||
commandSender.addChatMessage(new ChatComponentText(formattedLine));
|
||||
|
|
|
@ -368,11 +368,8 @@ public class WarpDrive {
|
|||
GameRegistry.registerBlock(blockChillers[index], ItemBlockAbstractBase.class, "blockChiller" + tier);
|
||||
}
|
||||
|
||||
// electromagnetic cell
|
||||
if (WarpDriveConfig.ACCELERATOR_ENABLE) {
|
||||
itemElectromagneticCell = new ItemElectromagneticCell();
|
||||
GameRegistry.registerItem(itemElectromagneticCell, "itemElectromagneticCell");
|
||||
}
|
||||
itemElectromagneticCell = new ItemElectromagneticCell();
|
||||
GameRegistry.registerItem(itemElectromagneticCell, "itemElectromagneticCell");
|
||||
}
|
||||
|
||||
// building blocks
|
||||
|
@ -463,10 +460,8 @@ public class WarpDrive {
|
|||
GameRegistry.registerBlock(blockIC2reactorLaserMonitor, ItemBlockAbstractBase.class, "blockIC2reactorLaserMonitor");
|
||||
GameRegistry.registerTileEntity(TileEntityIC2reactorLaserMonitor.class, MODID + ":blockIC2reactorLaserMonitor");
|
||||
|
||||
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
|
||||
itemIC2reactorLaserFocus = new ItemIC2reactorLaserFocus();
|
||||
GameRegistry.registerItem(itemIC2reactorLaserFocus, "itemIC2reactorLaserFocus");
|
||||
}
|
||||
itemIC2reactorLaserFocus = new ItemIC2reactorLaserFocus();
|
||||
GameRegistry.registerItem(itemIC2reactorLaserFocus, "itemIC2reactorLaserFocus");
|
||||
}
|
||||
|
||||
// force field blocks and items
|
||||
|
@ -475,27 +470,31 @@ public class WarpDrive {
|
|||
blockForceFieldRelays = new Block[3];
|
||||
for (byte tier = 1; tier <= 3; tier++) {
|
||||
final int index = tier - 1;
|
||||
// FORCE FIELD
|
||||
|
||||
blockForceFields[index] = new BlockForceField(tier);
|
||||
GameRegistry.registerBlock(blockForceFields[index], ItemBlockAbstractBase.class, "blockForceField" + tier);
|
||||
GameRegistry.registerTileEntity(TileEntityForceField.class, MODID + ":blockForceField" + tier);
|
||||
|
||||
// FORCE FIELD PROJECTOR
|
||||
blockForceFieldProjectors[index] = new BlockForceFieldProjector(tier);
|
||||
GameRegistry.registerBlock(blockForceFieldProjectors[index], ItemBlockForceFieldProjector.class, "blockProjector" + tier);
|
||||
GameRegistry.registerTileEntity(TileEntityForceFieldProjector.class, MODID + ":blockProjector" + tier);
|
||||
|
||||
// FORCE FIELD RELAY
|
||||
blockForceFieldRelays[index] = new BlockForceFieldRelay(tier);
|
||||
GameRegistry.registerBlock(blockForceFieldRelays[index], ItemBlockForceFieldRelay.class, "blockForceFieldRelay" + tier);
|
||||
GameRegistry.registerTileEntity(TileEntityForceFieldRelay.class, MODID + ":blockForceFieldRelay" + tier);
|
||||
}
|
||||
/* TODO
|
||||
/* @TODO security station
|
||||
blockSecurityStation = new BlockSecurityStation();
|
||||
GameRegistry.registerBlock(blockSecurityStation, ItemBlockAbstractBase.class, "blockSecurityStation");
|
||||
GameRegistry.registerTileEntity(TileEntitySecurityStation.class, MODID + ":blockSecurityStation");
|
||||
*/
|
||||
|
||||
itemForceFieldShape = new ItemForceFieldShape();
|
||||
GameRegistry.registerItem(itemForceFieldShape, "itemForceFieldShape");
|
||||
|
||||
itemForceFieldUpgrade = new ItemForceFieldUpgrade();
|
||||
GameRegistry.registerItem(itemForceFieldUpgrade, "itemForceFieldUpgrade");
|
||||
|
||||
// hull blocks
|
||||
blockHulls_plain = new Block[3][EnumHullPlainType.length];
|
||||
blockHulls_glass = new Block[3];
|
||||
|
@ -567,12 +566,6 @@ public class WarpDrive {
|
|||
GameRegistry.registerBlock(blockWeaponController, ItemBlockAbstractBase.class, "blockWeaponController");
|
||||
GameRegistry.registerTileEntity(TileEntityWeaponController.class, MODID + ":blockWeaponController");
|
||||
|
||||
itemForceFieldShape = new ItemForceFieldShape();
|
||||
GameRegistry.registerItem(itemForceFieldShape, "itemForceFieldShape");
|
||||
|
||||
itemForceFieldUpgrade = new ItemForceFieldUpgrade();
|
||||
GameRegistry.registerItem(itemForceFieldUpgrade, "itemForceFieldUpgrade");
|
||||
|
||||
// COMPONENT ITEMS
|
||||
itemComponent = new ItemComponent();
|
||||
GameRegistry.registerItem(itemComponent, "itemComponent");
|
||||
|
|
|
@ -23,26 +23,6 @@ public class BlockAbstractAccelerator extends BlockAbstractBase implements IBloc
|
|||
setCreativeTab(WarpDrive.creativeTabWarpDrive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(final int metadata) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getTier(final ItemStack itemStack) {
|
||||
return tier;
|
||||
|
|
|
@ -142,7 +142,7 @@ public class TileEntityAirGenerator extends TileEntityAbstractEnergy {
|
|||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] enable(final Context context, final Arguments arguments) {
|
||||
return enable(argumentsOCtoCC(arguments));
|
||||
return enable(argumentsOCtoCC(arguments));
|
||||
}
|
||||
|
||||
// ComputerCraft IPeripheral methods implementation
|
||||
|
|
|
@ -395,7 +395,7 @@ public class StarMapRegistry {
|
|||
if (!(tileEntity instanceof TileEntityShipCore)) {
|
||||
continue;
|
||||
}
|
||||
final TileEntityShipCore shipCore = (TileEntityShipCore) core.getWorldObj().getTileEntity(registryItem.x, registryItem.y, registryItem.z);
|
||||
final TileEntityShipCore shipCore = (TileEntityShipCore) tileEntity;
|
||||
|
||||
// Skip offline ship cores
|
||||
if (shipCore.isOffline()) {
|
||||
|
|
|
@ -101,7 +101,7 @@ public class TrajectoryPoint extends VectorI {
|
|||
int typeNew = NO_TYPE;
|
||||
|
||||
// check the core
|
||||
final Block blockCore = world.getBlock(x, y , z);
|
||||
final Block blockCore = world.getBlock(x, y, z);
|
||||
if (!(blockCore instanceof BlockVoidShellPlain)) {
|
||||
typeNew |= ERROR_MISSING_VOID_SHELL;
|
||||
}
|
||||
|
|
|
@ -2,33 +2,29 @@ package cr0s.warpdrive.world;
|
|||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
public class BiomeSpace extends BiomeGenBase
|
||||
{
|
||||
public BiomeSpace(final int biomeId)
|
||||
{
|
||||
super(biomeId);
|
||||
this.theBiomeDecorator.treesPerChunk = 0;
|
||||
//this.temperature = 1F;
|
||||
this.theBiomeDecorator.flowersPerChunk = 0;
|
||||
this.theBiomeDecorator.grassPerChunk = 0;
|
||||
this.biomeName = "Space";
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSpawningChance()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSpawnLightningBolt()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnableSnow()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public class BiomeSpace extends BiomeGenBase {
|
||||
|
||||
public BiomeSpace(final int biomeId) {
|
||||
super(biomeId);
|
||||
this.theBiomeDecorator.treesPerChunk = 0;
|
||||
//this.temperature = 1F;
|
||||
this.theBiomeDecorator.flowersPerChunk = 0;
|
||||
this.theBiomeDecorator.grassPerChunk = 0;
|
||||
this.biomeName = "Space";
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSpawningChance() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSpawnLightningBolt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnableSnow() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2 KiB |
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 428 B |
Loading…
Add table
Reference in a new issue