001 package net.minecraft.src;
002
003 import cpw.mods.fml.common.Side;
004 import cpw.mods.fml.common.asm.SideOnly;
005
006 @SideOnly(Side.CLIENT)
007 public class DestroyBlockProgress
008 {
009 /**
010 * entity ID of the player associated with this partially destroyed Block. Used to identify the Blocks in the client
011 * Renderer, max 1 per player on a server
012 */
013 private final int miningPlayerEntId;
014 private final int partialBlockX;
015 private final int partialBlockY;
016 private final int partialBlockZ;
017
018 /**
019 * damage ranges from 1 to 10. -1 causes the client to delete the partial block renderer.
020 */
021 private int partialBlockProgress;
022
023 public DestroyBlockProgress(int par1, int par2, int par3, int par4)
024 {
025 this.miningPlayerEntId = par1;
026 this.partialBlockX = par2;
027 this.partialBlockY = par3;
028 this.partialBlockZ = par4;
029 }
030
031 public int getPartialBlockX()
032 {
033 return this.partialBlockX;
034 }
035
036 public int getPartialBlockY()
037 {
038 return this.partialBlockY;
039 }
040
041 public int getPartialBlockZ()
042 {
043 return this.partialBlockZ;
044 }
045
046 /**
047 * inserts damage value into this partially destroyed Block. -1 causes client renderer to delete it, otherwise
048 * ranges from 1 to 10
049 */
050 public void setPartialBlockDamage(int par1)
051 {
052 if (par1 > 10)
053 {
054 par1 = 10;
055 }
056
057 this.partialBlockProgress = par1;
058 }
059
060 public int getPartialBlockDamage()
061 {
062 return this.partialBlockProgress;
063 }
064 }