Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sendBlockRemoving(int i, int j, int k, int l)
- {
- syncCurrentPlayItem();
- if(blockHitDelay > 0)
- {
- blockHitDelay--;
- return;
- }
- if(creativeMode)
- {
- blockHitDelay = 5;
- netClientHandler.addToSendQueue(new Packet14BlockDig(0, i, j, k, l));
- PlayerControllerCreative.func_35644_a(mc, this, i, j, k, l);
- return;
- }
- if(i == currentBlockX && j == currentBlockY && k == currentblockZ)
- {
- int i1 = mc.theWorld.getBlockId(i, j, k);
- if(i1 == 0)
- {
- isHittingBlock = false;
- return;
- }
- Block block = Block.blocksList[i1];
- if(base.instant)
- {
- curBlockDamageMP += block.blockStrength(mc.thePlayer) * 90000;
- } else
- {
- curBlockDamageMP += block.blockStrength(mc.thePlayer);
- }
- if(stepSoundTickCounter % 4F == 0.0F && block != null)
- {
- mc.sndManager.playSound(block.stepSound.stepSoundDir2(), (float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
- }
- stepSoundTickCounter++;
- if(curBlockDamageMP >= 1.0F)
- {
- isHittingBlock = false;
- netClientHandler.addToSendQueue(new Packet14BlockDig(2, i, j, k, l));
- if(!base.instant)
- {
- sendBlockRemoved(i, j, k, l);
- }
- curBlockDamageMP = 0.0F;
- prevBlockDamageMP =0F;
- stepSoundTickCounter =0F;
- blockHitDelay = base.instant ? 0 : 10;
- }
- } else
- {
- clickBlock(i, j, k, l);
- }
- }
Add Comment
Please, Sign In to add comment