MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / setTileEntity

Method setTileEntity

src/main/java/net/minecraft/world/World.java:2352–2380  ·  view source on GitHub ↗
(BlockPos pos, TileEntity tileEntityIn)

Source from the content-addressed store, hash-verified

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 {

Callers 7

setBlockStateMethod · 0.45
getTileEntityMethod · 0.45
func_150804_bMethod · 0.45
onBlockEventReceivedMethod · 0.45
doMoveMethod · 0.45
onBlockAddedMethod · 0.45
setStateMethod · 0.45

Calls 12

getPosMethod · 0.95
invalidateMethod · 0.95
addTileEntityMethod · 0.95
isInvalidMethod · 0.80
setPosMethod · 0.45
iteratorMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45
equalsMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected