OSDN Git Service

適当にコミット
[chemicraft/chemicraft.git] / common / chemicraft / debug / CommandSetTile.java
similarity index 66%
rename from common/chemicraft/util/CommandSetTile.java
rename to common/chemicraft/debug/CommandSetTile.java
index ed2709c..3ac0513 100644 (file)
@@ -1,44 +1,44 @@
-package chemicraft.util;
-
-import net.minecraft.src.Block;
-import net.minecraft.src.CommandBase;
-import net.minecraft.src.EntityPlayer;
-import net.minecraft.src.ICommandSender;
-import net.minecraft.src.World;
-import setBlockSupport.SetBlockSupport;
-
-public class CommandSetTile extends CommandBase {
-
-       @Override
-       public String getCommandName() {
-               return "setTile";
-       }
-
-       @Override
-       public void processCommand(ICommandSender var1, String[] var2) {
-               try{
-                       EntityPlayer player = (EntityPlayer)var1;
-                       World wolrd = player.worldObj;
-                       if(var2.length > 0){
-                               try{
-                                       if(Integer.parseInt(var2[0]) < 256){
-                                               if(var2.length > 1){
-                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), 12, 12);
-                                               }else{
-                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), 0, 12, 12);
-                                               }
-                                       }else{
-                                               var1.sendChatToPlayer("Over 256 than the Block ID.");
-                                       }
-                               }catch(NumberFormatException e){
-                                       var1.sendChatToPlayer("A given Character is not a number.");
-                               }
-                       }else{
-                               var1.sendChatToPlayer("Please specify the BlockID.(Optional have Metadata)");
-                       }
-               }catch(ClassCastException e){
-
-               }
-       }
-
-}
+package chemicraft.debug;\r
+\r
+import net.minecraft.src.Block;\r
+import net.minecraft.src.CommandBase;\r
+import net.minecraft.src.EntityPlayer;\r
+import net.minecraft.src.ICommandSender;\r
+import net.minecraft.src.World;\r
+import setBlockSupport.SetBlockSupport;\r
+\r
+public class CommandSetTile extends CommandBase {\r
+\r
+       @Override\r
+       public String getCommandName() {\r
+               return "setTile";\r
+       }\r
+\r
+       @Override\r
+       public void processCommand(ICommandSender var1, String[] var2) {\r
+               try{\r
+                       EntityPlayer player = (EntityPlayer)var1;\r
+                       World wolrd = player.worldObj;\r
+                       if(var2.length > 0){\r
+                               try{\r
+                                       if(Integer.parseInt(var2[0]) < 4096 && Block.blocksList[Integer.parseInt(var2[0])] != null || Integer.parseInt(var2[0]) == 0){\r
+                                               if(var2.length > 1){\r
+                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), 12, 12);\r
+                                               }else{\r
+                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), 0, 12, 12);\r
+                                               }\r
+                                       }else{\r
+                                               var1.sendChatToPlayer("\u00a7cBlockが存在しないか指定された数が4096を超えています。");\r
+                                       }\r
+                               }catch(NumberFormatException e){\r
+                                       var1.sendChatToPlayer("\u00a7c指定された文字は数値ではありません。");\r
+                               }\r
+                       }else{\r
+                               var1.sendChatToPlayer("\u00a7cBlockIDを指定してください。(Metadataも可能)");\r
+                       }\r
+               }catch(ClassCastException e){\r
+\r
+               }\r
+       }\r
+\r
+}\r