MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / checkGravity

Method checkGravity

src/main/java/gregapi/block/BlockBase.java:133–146  ·  view source on GitHub ↗
(World aWorld, int aX, int aY, int aZ)

Source from the content-addressed store, hash-verified

131 }
132
133 public boolean checkGravity(World aWorld, int aX, int aY, int aZ) {
134 byte aMeta = WD.meta(aWorld, aX, aY, aZ);
135 if (aY > 0 && useGravity(aMeta) && BlockFalling.func_149831_e(aWorld, aX, aY - 1, aZ)) {
136 if (!BlockFalling.fallInstantly && aWorld.checkChunksExist(aX-32, aY-32, aZ-32, aX+32, aY+32, aZ+32)) {
137 if (!aWorld.isRemote) aWorld.spawnEntityInWorld(new EntityFallingBlock(aWorld, aX+0.5, aY+0.5, aZ+0.5, this, aMeta));
138 } else {
139 aWorld.setBlockToAir(aX, aY, aZ);
140 while (BlockFalling.func_149831_e(aWorld, aX, aY-1, aZ) && aY > 0) --aY;
141 if (aY > 0) WD.set(aWorld, aX, aY, aZ, this, aMeta, 2);
142 }
143 return T;
144 }
145 return F;
146 }
147
148 @Override public boolean onItemUseFirst(ItemBlockBase aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float aHitX, float aHitY, float aHitZ) {return F;}
149

Callers 1

updateTickMethod · 0.95

Calls 3

metaMethod · 0.95
useGravityMethod · 0.95
setMethod · 0.95

Tested by

no test coverage detected