(String name)
| 186 | } |
| 187 | |
| 188 | public static Block getBlockFromName(String name) |
| 189 | { |
| 190 | ResourceLocation resourcelocation = new ResourceLocation(name); |
| 191 | |
| 192 | if (blockRegistry.containsKey(resourcelocation)) |
| 193 | { |
| 194 | return blockRegistry.getObject(resourcelocation); |
| 195 | } |
| 196 | else |
| 197 | { |
| 198 | try |
| 199 | { |
| 200 | return blockRegistry.getObjectById(Integer.parseInt(name)); |
| 201 | } |
| 202 | catch (NumberFormatException var3) |
| 203 | { |
| 204 | return null; |
| 205 | } |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | public boolean isFullBlock() |
| 210 | { |