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

Method offset

src/main/java/net/optifine/BlockPosM.java:95–127  ·  view source on GitHub ↗

Offset this BlockPos 1 block in the given direction

(EnumFacing facing)

Source from the content-addressed store, hash-verified

93 * Offset this BlockPos 1 block in the given direction
94 */
95 public BlockPos offset(EnumFacing facing)
96 {
97 if (this.level <= 0)
98 {
99 return super.offset(facing, 1);
100 }
101 else
102 {
103 if (this.facings == null)
104 {
105 this.facings = new BlockPosM[EnumFacing.VALUES.length];
106 }
107
108 if (this.needsUpdate)
109 {
110 this.update();
111 }
112
113 int i = facing.getIndex();
114 BlockPosM blockposm = this.facings[i];
115
116 if (blockposm == null)
117 {
118 int j = this.mx + facing.getFrontOffsetX();
119 int k = this.my + facing.getFrontOffsetY();
120 int l = this.mz + facing.getFrontOffsetZ();
121 blockposm = new BlockPosM(j, k, l, this.level - 1);
122 this.facings[i] = blockposm;
123 }
124
125 return blockposm;
126 }
127 }
128
129 /**
130 * Offsets this BlockPos n blocks in the given direction

Callers 15

offsetMutableMethod · 0.95
getChunkPosMethod · 0.45
skipConnectedTextureMethod · 0.45
isNeighbourOverlayMethod · 0.45
isNeighbourMatchingMethod · 0.45
getFaceQuadsDirtMethod · 0.45
getBlockAtMethod · 0.45
getOffsetBoundingBoxMethod · 0.45
getRenderQuadsMethod · 0.45
onItemUseMethod · 0.45
drawFilledAABBMethod · 0.45

Calls 5

updateMethod · 0.95
getFrontOffsetXMethod · 0.80
getFrontOffsetYMethod · 0.80
getFrontOffsetZMethod · 0.80
getIndexMethod · 0.45

Tested by

no test coverage detected