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