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

Class RandomTileEntity

src/main/java/net/optifine/RandomTileEntity.java:9–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7import net.optifine.util.TileEntityUtils;
8
9public class RandomTileEntity implements IRandomEntity
10{
11 private TileEntity tileEntity;
12
13 public int getId()
14 {
15 return Config.getRandom(this.tileEntity.getPos(), this.tileEntity.getBlockMetadata());
16 }
17
18 public BlockPos getSpawnPosition()
19 {
20 return this.tileEntity.getPos();
21 }
22
23 public String getName()
24 {
25 String s = TileEntityUtils.getTileEntityName(this.tileEntity);
26 return s;
27 }
28
29 public BiomeGenBase getSpawnBiome()
30 {
31 return this.tileEntity.getWorld().getBiomeGenForCoords(this.tileEntity.getPos());
32 }
33
34 public int getHealth()
35 {
36 return -1;
37 }
38
39 public int getMaxHealth()
40 {
41 return -1;
42 }
43
44 public TileEntity getTileEntity()
45 {
46 return this.tileEntity;
47 }
48
49 public void setTileEntity(TileEntity tileEntity)
50 {
51 this.tileEntity = tileEntity;
52 }
53}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected