(NBTBase tag, int intendedLength)
| 256 | } |
| 257 | |
| 258 | public static double[] readDoubleArray(NBTBase tag, int intendedLength) { |
| 259 | double[] arr = new double[intendedLength]; |
| 260 | if (tag instanceof NBTTagList) { |
| 261 | NBTTagList list = (NBTTagList) tag; |
| 262 | for (int i = 0; i < list.tagCount() && i < intendedLength; i++) { |
| 263 | arr[i] = list.getDoubleAt(i); |
| 264 | } |
| 265 | } |
| 266 | return arr; |
| 267 | } |
| 268 | |
| 269 | public static NBTTagCompound writeEntireBlockState(IBlockState state) { |
| 270 | if (state == null || state == Blocks.AIR.getDefaultState()) { |