this.world.methodProfiler.a("ai"); if (this.bh()) { this.bc = false; this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); if (this.bc) { if (!this.M() && !this.P()) { this.world.methodProfiler.b(); this.world.methodProfiler.a("travel"); this.bd *= 0.98F; this.be *= 0.98F; this.bf *= 0.9F; this.e(this.bd, this.be); this.world.methodProfiler.b(); this.world.methodProfiler.a("push"); this.bo(); this.world.methodProfiler.b();
/** * Sets a block type id and data, causing physics and lighting updates * * @param chunk the block is in * @param x - coordinate of the block * @param y - coordinate of the block * @param z - coordinate of the block * @param type to set to * @param data to set to * @return True if a block got changed, False if not */ public static boolean setBlock(org.bukkit.Chunk chunk, int x, int y, int z, Material type, int data) { boolean result = y >= 0 && y <= chunk.getWorld().getMaxHeight(); WorldServer world = CommonNMS.getNative(chunk.getWorld()); Block typeBlock = CommonNMS.getBlock(type); if (result) { result = ChunkRef.setBlock(Conversion.toChunkHandle.convert(chunk), x, y, z, typeBlock, data); world.methodProfiler.a("checkLight"); world.z(x, y, z); world.methodProfiler.b(); } if (result) { world.applyPhysics(x, y, z, typeBlock); } return result; }