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

Method getTileEntity

src/main/java/net/minecraft/world/chunk/Chunk.java:918–941  ·  view source on GitHub ↗
(BlockPos pos, Chunk.EnumCreateEntityType p_177424_2_)

Source from the content-addressed store, hash-verified

916 }
917
918 public TileEntity getTileEntity(BlockPos pos, Chunk.EnumCreateEntityType p_177424_2_)
919 {
920 TileEntity tileentity = this.chunkTileEntityMap.get(pos);
921
922 if (tileentity == null)
923 {
924 if (p_177424_2_ == Chunk.EnumCreateEntityType.IMMEDIATE)
925 {
926 tileentity = this.createNewTileEntity(pos);
927 this.worldObj.setTileEntity(pos, tileentity);
928 }
929 else if (p_177424_2_ == Chunk.EnumCreateEntityType.QUEUED)
930 {
931 this.tileEntityPosQueue.add(pos);
932 }
933 }
934 else if (tileentity.isInvalid())
935 {
936 this.chunkTileEntityMap.remove(pos);
937 return null;
938 }
939
940 return tileentity;
941 }
942
943 public void addTileEntity(TileEntity tileEntityIn)
944 {

Callers 3

getTileEntityMethod · 0.95
setBlockStateMethod · 0.95
func_150804_bMethod · 0.95

Calls 6

createNewTileEntityMethod · 0.95
isInvalidMethod · 0.95
getMethod · 0.65
setTileEntityMethod · 0.45
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected