(BlockPos pos, TileEntity tileEntityIn)
| 2350 | } |
| 2351 | |
| 2352 | public void setTileEntity(BlockPos pos, TileEntity tileEntityIn) |
| 2353 | { |
| 2354 | if (tileEntityIn != null && !tileEntityIn.isInvalid()) |
| 2355 | { |
| 2356 | if (this.processingLoadedTiles) |
| 2357 | { |
| 2358 | tileEntityIn.setPos(pos); |
| 2359 | Iterator<TileEntity> iterator = this.addedTileEntityList.iterator(); |
| 2360 | |
| 2361 | while (iterator.hasNext()) |
| 2362 | { |
| 2363 | TileEntity tileentity = iterator.next(); |
| 2364 | |
| 2365 | if (tileentity.getPos().equals(pos)) |
| 2366 | { |
| 2367 | tileentity.invalidate(); |
| 2368 | iterator.remove(); |
| 2369 | } |
| 2370 | } |
| 2371 | |
| 2372 | this.addedTileEntityList.add(tileEntityIn); |
| 2373 | } |
| 2374 | else |
| 2375 | { |
| 2376 | this.addTileEntity(tileEntityIn); |
| 2377 | this.getChunkFromBlockCoords(pos).addTileEntity(pos, tileEntityIn); |
| 2378 | } |
| 2379 | } |
| 2380 | } |
| 2381 | |
| 2382 | public void removeTileEntity(BlockPos pos) |
| 2383 | { |
no test coverage detected