(Block blockIn)
| 1030 | } |
| 1031 | |
| 1032 | public boolean canDestroy(Block blockIn) |
| 1033 | { |
| 1034 | if (blockIn == this.canDestroyCacheBlock) |
| 1035 | { |
| 1036 | return this.canDestroyCacheResult; |
| 1037 | } |
| 1038 | else |
| 1039 | { |
| 1040 | this.canDestroyCacheBlock = blockIn; |
| 1041 | |
| 1042 | if (this.hasTagCompound() && this.stackTagCompound.hasKey("CanDestroy", 9)) |
| 1043 | { |
| 1044 | NBTTagList nbttaglist = this.stackTagCompound.getTagList("CanDestroy", 8); |
| 1045 | |
| 1046 | for (int i = 0; i < nbttaglist.tagCount(); ++i) |
| 1047 | { |
| 1048 | Block block = Block.getBlockFromName(nbttaglist.getStringTagAt(i)); |
| 1049 | |
| 1050 | if (block == blockIn) |
| 1051 | { |
| 1052 | this.canDestroyCacheResult = true; |
| 1053 | return true; |
| 1054 | } |
| 1055 | } |
| 1056 | } |
| 1057 | |
| 1058 | this.canDestroyCacheResult = false; |
| 1059 | return false; |
| 1060 | } |
| 1061 | } |
| 1062 | |
| 1063 | public boolean canPlaceOn(Block blockIn) |
| 1064 | { |
no test coverage detected