Added world clear command to test ores
This commit is contained in:
parent
a23286d0e7
commit
62fb79a6b0
1 changed files with 15 additions and 5 deletions
|
@ -3,6 +3,9 @@ package techreborn.command;
|
|||
|
||||
import net.minecraft.command.CommandBase;
|
||||
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.minecraftforge.fluids.Fluid;
|
||||
import reborncore.api.fuel.FluidPowerManager;
|
||||
|
@ -43,11 +46,18 @@ public class TechRebornDevCommand extends CommandBase {
|
|||
sender.addChatMessage(new ChatComponentText("Found invalid fluid entry"));
|
||||
}
|
||||
}
|
||||
// } else if ("parts".equals(args[0])) { //TODO 1.8
|
||||
// for (IModPart part : ModPartRegistry.parts) {
|
||||
// sender.addChatMessage(new ChatComponentText(part.getName()));
|
||||
// }
|
||||
// }
|
||||
} else if ("clear".equals(args[0])) {
|
||||
EntityPlayerMP playerMP = (EntityPlayerMP) sender;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue