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

Method getBlockEntityId

src/main/java/net/optifine/shaders/Shaders.java:5180–5208  ·  view source on GitHub ↗
(TileEntity tileEntity)

Source from the content-addressed store, hash-verified

5178 }
5179
5180 private static int getBlockEntityId(TileEntity tileEntity)
5181 {
5182 if (tileEntity == null)
5183 {
5184 return -1;
5185 }
5186 else
5187 {
5188 Block block = tileEntity.getBlockType();
5189
5190 if (block == null)
5191 {
5192 return 0;
5193 }
5194 else
5195 {
5196 int i = Block.getIdFromBlock(block);
5197 int j = tileEntity.getBlockMetadata();
5198 int k = BlockAliases.getBlockAliasId(i, j);
5199
5200 if (k >= 0)
5201 {
5202 i = k;
5203 }
5204
5205 return i;
5206 }
5207 }
5208 }
5209
5210 public static void endBlockEntities()
5211 {

Callers 1

setBlockEntityIdMethod · 0.95

Calls 4

getIdFromBlockMethod · 0.95
getBlockAliasIdMethod · 0.95
getBlockMetadataMethod · 0.65
getBlockTypeMethod · 0.45

Tested by

no test coverage detected