OSDN Git Service

粉塵完成版。チケット完了にしておきます
authormozipi <mozipi@users.sourceforge.jp>
Thu, 7 Mar 2013 11:23:26 +0000 (20:23 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Thu, 7 Mar 2013 11:23:26 +0000 (20:23 +0900)
common/pcc/chemicraft/ChemiCraft.java
common/pcc/chemicraft/item/ItemDust.java

index 9a997ca..61d183b 100644 (file)
@@ -533,11 +533,6 @@ public class ChemiCraft implements Runnable {
                                250,
                                5,
                                true);
-               /*
-               EntityRegistry.registerGlobalEntityID(EntityDust.class,
-                               "Dust",
-                               ModLoader.getUniqueEntityId());
-                               */
 
                this.api.addPyrolysisDecompositionFuel(new ItemStack(Item.coal), 2000*8);
        }
index 6a0cd3b..192545c 100644 (file)
@@ -18,12 +18,15 @@ public class ItemDust extends Item {
        @Override
        public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World,
                        EntityPlayer par3EntityPlayer) {
-               par2World.spawnEntityInWorld(new EntityDust(par2World,
-                               par3EntityPlayer.posX,
-                               par3EntityPlayer.posY,
-                               par3EntityPlayer.posZ));
+               if (!par2World.isRemote) {
+                       par2World.spawnEntityInWorld(new EntityDust(par2World,
+                                       par3EntityPlayer.posX,
+                                       par3EntityPlayer.posY,
+                                       par3EntityPlayer.posZ));
+                       par1ItemStack.stackSize--;
+               }
                return par1ItemStack;
        }
 
-       
+
 }