Returns true if the given bounding box contains the given material
(AxisAlignedBB bb, Material materialIn)
| 2130 | * Returns true if the given bounding box contains the given material |
| 2131 | */ |
| 2132 | public boolean isMaterialInBB(AxisAlignedBB bb, Material materialIn) |
| 2133 | { |
| 2134 | int i = MathHelper.floor_double(bb.minX); |
| 2135 | int j = MathHelper.floor_double(bb.maxX + 1.0D); |
| 2136 | int k = MathHelper.floor_double(bb.minY); |
| 2137 | int l = MathHelper.floor_double(bb.maxY + 1.0D); |
| 2138 | int i1 = MathHelper.floor_double(bb.minZ); |
| 2139 | int j1 = MathHelper.floor_double(bb.maxZ + 1.0D); |
| 2140 | BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); |
| 2141 | |
| 2142 | for (int k1 = i; k1 < j; ++k1) |
| 2143 | { |
| 2144 | for (int l1 = k; l1 < l; ++l1) |
| 2145 | { |
| 2146 | for (int i2 = i1; i2 < j1; ++i2) |
| 2147 | { |
| 2148 | if (this.getBlockState(blockpos$mutableblockpos.func_181079_c(k1, l1, i2)).getBlock().getMaterial() == materialIn) |
| 2149 | { |
| 2150 | return true; |
| 2151 | } |
| 2152 | } |
| 2153 | } |
| 2154 | } |
| 2155 | |
| 2156 | return false; |
| 2157 | } |
| 2158 | |
| 2159 | /** |
| 2160 | * checks if the given AABB is in the material given. Used while swimming. |
no test coverage detected