Added world clear command to test ores

This commit is contained in:
modmuss50 2016-03-11 11:01:51 +00:00
parent a23286d0e7
commit 62fb79a6b0

View file

@ -3,6 +3,9 @@ package techreborn.command;
import net.minecraft.command.CommandBase; import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender; import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentText;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import reborncore.api.fuel.FluidPowerManager; import reborncore.api.fuel.FluidPowerManager;
@ -43,11 +46,18 @@ public class TechRebornDevCommand extends CommandBase {
sender.addChatMessage(new ChatComponentText("Found invalid fluid entry")); sender.addChatMessage(new ChatComponentText("Found invalid fluid entry"));
} }
} }
// } else if ("parts".equals(args[0])) { //TODO 1.8 } else if ("clear".equals(args[0])) {
// for (IModPart part : ModPartRegistry.parts) { EntityPlayerMP playerMP = (EntityPlayerMP) sender;
// sender.addChatMessage(new ChatComponentText(part.getName())); 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 (playerMP.worldObj.getBlockState(pos).getBlock() == Blocks.stone || playerMP.worldObj.getBlockState(pos).getBlock() == Blocks.dirt) {
playerMP.worldObj.setBlockState(pos, Blocks.air.getDefaultState(), 2);
}
}
}
}
} }
} }
} }