Auto Format code

This commit is contained in:
modmuss50 2016-10-08 20:46:16 +01:00
parent 112b1657cf
commit 796df6c055
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
503 changed files with 12260 additions and 16291 deletions

View file

@ -20,70 +20,53 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class TechRebornDevCommand extends CommandBase
{
public class TechRebornDevCommand extends CommandBase {
@Override
public String getCommandName()
{
public String getCommandName() {
return "trdev";
}
@Override
public String getCommandUsage(ICommandSender icommandsender)
{
public String getCommandUsage(ICommandSender icommandsender) {
return "commands.forge.usage";
}
@Override
public int getRequiredPermissionLevel()
{
public int getRequiredPermissionLevel() {
return 2;
}
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
{
if (args.length == 0)
{
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
if (args.length == 0) {
sender.addChatMessage(new TextComponentString("You need to use arguments, see /trdev help"));
} else if ("help".equals(args[0]))
{
} else if ("help".equals(args[0])) {
sender.addChatMessage(new TextComponentString("recipes - Shows size of the recipe array"));
sender.addChatMessage(new TextComponentString("fluid - Lists the fluid power values"));
} else if ("recipes".equals(args[0]))
{
} else if ("recipes".equals(args[0])) {
sender.addChatMessage(new TextComponentString(RecipeHandler.recipeList.size() + " recipes loaded"));
} else if ("fluid".equals(args[0]))
{
for (Object object : FluidPowerManager.fluidPowerValues.keySet().toArray())
{
if (object instanceof Fluid)
{
} else if ("fluid".equals(args[0])) {
for (Object object : FluidPowerManager.fluidPowerValues.keySet().toArray()) {
if (object instanceof Fluid) {
Fluid fluid = (Fluid) object;
sender.addChatMessage(new TextComponentString(
fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
} else
{
fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
} else {
sender.addChatMessage(new TextComponentString("Found invalid fluid entry"));
}
}
} else if ("clear".equals(args[0]))
{
} else if ("clear".equals(args[0])) {
EntityPlayerMP playerMP = (EntityPlayerMP) sender;
List<Block> blocksToRemove = new ArrayList<>();
blocksToRemove.add(Blocks.GRASS);
blocksToRemove.add(Blocks.DIRT);
blocksToRemove.add(Blocks.STONE);
for (int x = 0; x < 25; x++)
{
for (int z = 0; z < 25; z++)
{
for (int y = 0; y < playerMP.posY; y++)
{
for (int x = 0; x < 25; x++) {
for (int z = 0; z < 25; z++) {
for (int y = 0; y < playerMP.posY; y++) {
BlockPos pos = new BlockPos(playerMP.posX + x, y, playerMP.posZ + z);
if (blocksToRemove.contains(playerMP.worldObj.getBlockState(pos).getBlock()))
{
if (blocksToRemove.contains(playerMP.worldObj.getBlockState(pos).getBlock())) {
playerMP.worldObj.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
}
}