diff --git a/src/main/java/cr0s/warpdrive/block/BlockAbstractBase.java b/src/main/java/cr0s/warpdrive/block/BlockAbstractBase.java index aa39056f..1bf6440c 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockAbstractBase.java +++ b/src/main/java/cr0s/warpdrive/block/BlockAbstractBase.java @@ -7,7 +7,6 @@ import cr0s.warpdrive.api.IBlockBase; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.world.World; diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java index 51191ca0..d407744b 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java @@ -122,7 +122,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase { } @Override - public Item getItemDropped(int metadata, Random random, int fortune) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return null; } diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java index f7dec8ad..a3f726cc 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java @@ -87,7 +87,7 @@ public class BlockAirGenerator extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java index 8b07170a..2747b0d6 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java @@ -85,7 +85,7 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer { } @Override - public Item getItemDropped(int metadata, Random random, int fortune) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java b/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java index 1a66c7a1..c869cd60 100644 --- a/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java +++ b/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java @@ -121,7 +121,7 @@ public class BlockShipScanner extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java index 887cd3c5..58cab4b0 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java @@ -89,11 +89,8 @@ public class BlockLaserTreeFarm extends BlockAbstractContainer { return 1; } - /** - * Returns the item to drop on destruction. - */ @Override - public Item getItemDropped(int par1, Random random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java index 5b9bcad1..d106a660 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java @@ -85,11 +85,8 @@ public class BlockMiningLaser extends BlockAbstractContainer { return 1; } - /** - * Returns the item to drop on destruction. - */ @Override - public Item getItemDropped(int par1, Random random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java index f27a1a5f..9ef73e7e 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java @@ -64,7 +64,7 @@ public class BlockCamera extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java b/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java index 0ddf8a76..09884b6a 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java @@ -90,7 +90,7 @@ public class BlockRadar extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java b/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java index 13904474..a9e16016 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java @@ -35,23 +35,17 @@ public class BlockWarpIsolation extends Block { @SideOnly(Side.CLIENT) @Override - public IIcon getIcon(int side, int metadata) { + public IIcon getIcon(final int side, final int metadata) { return iconBuffer[0]; } - - /** - * Returns the quantity of items to drop on block destruction. - */ + @Override - public int quantityDropped(Random par1Random) { + public int quantityDropped(final Random random) { return 1; } - - /** - * Returns the ID of the items to drop on destruction. - */ + @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { - return Item.getItemFromBlock(this); + public Item getItemDropped(final int metadata, final Random random, final int fortune) { + return Item.getItemFromBlock(this); } } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java b/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java index 96dce0eb..bce99b4a 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java @@ -89,7 +89,7 @@ public class BlockLift extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java b/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java index 2e4459ed..fab87987 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java @@ -94,11 +94,8 @@ public class BlockShipController extends BlockAbstractContainer { return 1; } - /** - * Returns the items to drop on destruction. - */ @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockBedrockGlass.java b/src/main/java/cr0s/warpdrive/block/passive/BlockBedrockGlass.java index ab4bc5da..936f6a51 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockBedrockGlass.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockBedrockGlass.java @@ -77,7 +77,7 @@ public class BlockBedrockGlass extends Block { } @Override - public Item getItemDropped(int var1, Random random, int var3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return null; } diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java b/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java index ab27d2ce..a8619340 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java @@ -104,7 +104,7 @@ public class BlockGas extends Block { } @Override - public Item getItemDropped(int var1, Random var2, int var3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return null; } diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java b/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java index fae50d02..36c5bbfa 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java @@ -29,7 +29,7 @@ public class BlockHighlyAdvancedMachine extends Block { } @Override - public Item getItemDropped(int var1, Random var2, int var3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java b/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java index 7acdf61e..1be136d7 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java @@ -30,7 +30,7 @@ public class BlockIridium extends Block { } @Override - public Item getItemDropped(int var1, Random var2, int var3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java index 24a7bdcb..60c1f8cc 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java @@ -65,7 +65,7 @@ public class BlockWeaponController extends BlockAbstractContainer { } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(final int metadata, final Random random, final int fortune) { return Item.getItemFromBlock(this); } diff --git a/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java b/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java index 9dd05834..254bf367 100644 --- a/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java +++ b/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java @@ -524,7 +524,6 @@ public class AcceleratorSetup extends GlobalPosition { final int energyMean = amount_internal / energyBanks.size(); int energyConsumed = 0; int energyLeft = amount_internal - energyMean * energyBanks.size(); - assert(energyConsumed + energyLeft == amount_internal); for (final TileEntityEnergyBank tileEntityEnergyBank : energyBanks) { final int energyToConsume = Math.min(tileEntityEnergyBank.energy_getPotentialOutput(), energyMean + energyLeft); tileEntityEnergyBank.energy_consume(energyToConsume); diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveLaserTreefarm/farm b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveLaserTreefarm/farm index 0e27a5b3..01898944 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveLaserTreefarm/farm +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveLaserTreefarm/farm @@ -22,7 +22,7 @@ if #args > 0 then if args[1] == "help" or args[1] == "?" then print("Usage: farm ") print() - print("Farmer always farm above it.") + print("Farmer always farms above it.") print("Use 'true' or '1' to enable an option.") print("Use 'false' or '0' to disable an option.") print("Default is to break leaves and tap rubber trees.") @@ -81,7 +81,7 @@ if noExit then local areActive repeat areActive = false - for key,treefarm in pairs(treefarms) do + for key, treefarm in pairs(treefarms) do local status, isActive, energy, totalHarvested, currentValuable, totalValuables = treefarm.state() term.setBackgroundColor(colors.black) diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMiningLaser/mine b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMiningLaser/mine index 5e6ea379..c6c6acec 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMiningLaser/mine +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveMiningLaser/mine @@ -22,7 +22,7 @@ if #args > 0 then if args[1] == "help" or args[1] == "?" then print("Usage: mine ") print() - print("Miner always mine below it, down to bedrock.") + print("Miner always mines below it, down to bedrock.") print("Set layerOffset to define starting level.") print("Power consumption will be much lower in space.") print("Mining only ores is faster but more expensive...") diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveRadar/scan b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveRadar/scan index dde86d2b..4e9c9fa8 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveRadar/scan +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveRadar/scan @@ -96,6 +96,7 @@ function scanAndDraw() return 0 end + radar.radius(radius) radar.start() local scanDuration = radar.getScanDuration(radius) diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveTransporterCore/startup b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveTransporterCore/startup index 6acf8990..d129f18c 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveTransporterCore/startup +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveTransporterCore/startup @@ -168,7 +168,7 @@ function transporter_page_writeEnergy(energy) w.setColorNormal() w.setCursorPos(19, 8) if energy[2] ~= nil then - w.write(w.format_integer(energy[1], 7) .. " / " .. energy[2] .. " EU ") + w.write(w.format_integer(energy[1], 7) .. " / " .. energy[2] .. " EU ") else w.write(w.format_string("???", 20)) end @@ -287,7 +287,7 @@ function transporter_config() remoteLocation[2] = "0"; remoteLocation[3] = "0"; end - + w.setColorNormal() w.setCursorPos(1, 11) w.writeFullLine(" ") diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveLaserTreefarm/farm b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveLaserTreefarm/farm index fab5cb22..ba4bee40 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveLaserTreefarm/farm +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveLaserTreefarm/farm @@ -34,12 +34,12 @@ local noExit = true breakLeaves = true tapTrees = true silktouch = false -local args = {... } +local args = {...} if #args > 0 then if args[1] == "help" or args[1] == "?" then print("Usage: farm ") print() - print("Farmer always farm above it.") + print("Farmer always farms above it.") print("Use 'true' or '1' to enable an option.") print("Use 'false' or '0' to disable an option.") print("Default is to break leaves and tap rubber trees.") @@ -69,6 +69,7 @@ end if #treefarms == 0 then computer.beep() textOut(1, 2, "No laser tree farm detected", 0xFFFFFF, 0xFF0000) + noExit = false end if noExit then diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveMiningLaser/mine b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveMiningLaser/mine index c0920827..067c121d 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveMiningLaser/mine +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveMiningLaser/mine @@ -39,7 +39,7 @@ if #args > 0 then if args[1] == "help" or args[1] == "?" then print("Usage: mine ") print() - print("Miner always mine below it, down to bedrock.") + print("Miner always mines below it, down to bedrock.") print("Set layerOffset to define starting level.") print("Power consumption will be much lower in space.") print("Mining only ores is faster but more expensive...") diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/ping b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/ping index 80769676..f53b312a 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/ping +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/ping @@ -31,6 +31,7 @@ local argv = { ... } if #argv ~= 1 then showErrorAndExit("Usage: ping ") end + local radius = tonumber(argv[1]) if radius < 1 or radius > 9999 then diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/scan b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/scan index cf115373..c64f8512 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/scan +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveRadar/scan @@ -157,4 +157,4 @@ while component.isAvailable("warpdriveRadar") and continue do os.sleep(0) end -term.clear() \ No newline at end of file +term.clear() diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveTransporterCore/startup b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveTransporterCore/startup index 2c4a9335..ee6df5e5 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveTransporterCore/startup +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveTransporterCore/startup @@ -167,7 +167,7 @@ function transporter_page_writeEnergy(energy) w.setColorNormal() w.setCursorPos(19, 8) if energy[2] ~= nil then - w.write(w.format_integer(energy[1], 7) .. " / " .. energy[2] .. " EU") + w.write(w.format_integer(energy[1], 7) .. " / " .. energy[2] .. " EU ") else w.write(w.format_string("???", 20)) end @@ -182,7 +182,7 @@ function transporter_page_writeLockStrength(lockStrength) else w.setColorWarning() end - w.write(w.format_float(percent) .. " %") + w.write(w.format_float(percent) .. " % ") else w.setColorDisabled() w.write(w.format_string("-none-", 7)) @@ -286,7 +286,7 @@ function transporter_config() remoteLocation[2] = "0"; remoteLocation[3] = "0"; end - + w.setColorNormal() w.setCursorPos(1, 11) w.writeFullLine(" ") diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveWeaponController/startup b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveWeaponController/startup index 64ea6368..755533d1 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveWeaponController/startup +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveWeaponController/startup @@ -28,7 +28,7 @@ function laser_save(parData) data.laser_stations[keyStation] = { name = laserstation.name, cameraAddress = laserstation.cameraAddress, - batteries = {}} + batteries = {} } for keyBattery, laserbattery in pairs(laser_stations[keyStation].batteries) do data.laser_stations[keyStation].batteries[keyBattery] = { name = laserbattery.name,