1 package chemicraft.debug;
\r
3 import net.minecraft.block.Block;
\r
4 import net.minecraft.command.CommandBase;
\r
5 import net.minecraft.command.ICommandSender;
\r
6 import net.minecraft.entity.player.EntityPlayer;
\r
7 import net.minecraft.world.World;
\r
9 public class CommandSetTile extends CommandBase {
\r
12 public String getCommandName() {
\r
17 public void processCommand(ICommandSender var1, String[] var2) {
\r
19 EntityPlayer player = (EntityPlayer)var1;
\r
20 World wolrd = player.worldObj;
\r
21 if(var2.length > 0){
\r
23 if(Integer.parseInt(var2[0]) < 4096 && Block.blocksList[Integer.parseInt(var2[0])] != null || Integer.parseInt(var2[0]) == 0){
\r
24 if(var2.length == 1){
\r
25 SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), 12, 12);
\r
26 }else if(var2.length > 2){
\r
27 SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), Integer.parseInt(var2[2]), Integer.parseInt(var2[2]));
\r
29 SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), 0, 12, 12);
\r
32 var1.sendChatToPlayer("\u00a7cBlockが存在しないか指定された数が4096を超えています。");
\r
34 }catch(NumberFormatException e){
\r
35 var1.sendChatToPlayer("\u00a7c指定された文字は数値ではありません。");
\r
38 var1.sendChatToPlayer("\u00a7cBlockIDを指定してください。(Metadata, Sizeも可能)");
\r
40 }catch(ClassCastException e){
\r